Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8387

Maven mirrors not used when project uses Maven 2.2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Ubuntu Lucid
    • Similar Issues:

      Description

      After upgrading from 1.391 to 1.392, Maven 2.2.1 builds fail when requiring that new artifacts be downloaded from a local Maven repository proxy (Nexus). Even though Maven is configured to use the proxy as a mirror for all repositories, artifacts are attempted to be downloaded from the actual repositories. Downgrading to 1.391 fixes the issue.

      Settings.xml
      <mirrors/>
          <mirror>
              <id>nexus</id>
              <mirrorOf>*</mirrorOf>
              <url>http://my.internal.nexus/content/groups/public</url>
          </mirror>
      <mirrors>
      <profiles>
          <profile>
              <repositories>
                  <repository>
                      <id>other-repo</id>
                      <url>http://www.external.url.com/m2</url>
                      <releases>
                          <enabled>true</enabled>
                      </releases>
                      <snapshots>
                          <enabled>true</enabled>
                      </snapshots>
                  </repository>
              </repositories>
              <pluginRepositories>
                  <pluginRepository>
                      <id>other-repo</id>
                      <url>http://www.external.url.com/m2</url>
                      <releases>
                          <enabled>true</enabled>
                      </releases>
                      <snapshots>
                          <enabled>true</enabled>
                      </snapshots>
                  </pluginRepository>
              </pluginRepositories>
          </profile>
      </profiles>
      

      Logs report a 407 response when trying to retrieve the artifact from http://www.external.url.com/m2/org/new/artifact/1.1.0-SNAPSHOT/artifact-1.1.0-SNAPSHOT.jar.

        Attachments

          Issue Links

            Activity

            Hide
            olamy Olivier Lamy added a comment -

            does your mirror need authz ?
            If yes you have probably a server section in your ~/.m2/settings.xml, is it with encrypted password or plain text ?
            Then do you use a particular configuration for the settings path : s,-settings ?
            To be sure this occurs during the pom parsing phase ?
            Thanks

            Show
            olamy Olivier Lamy added a comment - does your mirror need authz ? If yes you have probably a server section in your ~/.m2/settings.xml, is it with encrypted password or plain text ? Then do you use a particular configuration for the settings path : s, -settings ? To be sure this occurs during the pom parsing phase ? Thanks
            Hide
            dan_yell dan_yell added a comment -

            The mirror doesn't require authentication/authorisation to retrieve artifacts, but needs authentication to deploy them. Settings.xml contains a server section for the deployment url only, containing a plain text password. Settings.xml is in the default location (~/.m2/settings.xml). I don't think the error occurs during the pom parsing phase, given that it appears to be the result of a failed attempt to download an artifact. I don't have the log file, sorry.

            Show
            dan_yell dan_yell added a comment - The mirror doesn't require authentication/authorisation to retrieve artifacts, but needs authentication to deploy them. Settings.xml contains a server section for the deployment url only, containing a plain text password. Settings.xml is in the default location ( ~/.m2/settings.xml ). I don't think the error occurs during the pom parsing phase, given that it appears to be the result of a failed attempt to download an artifact. I don't have the log file, sorry.
            Hide
            olamy Olivier Lamy added a comment -

            I need to know when this happened during the build.
            Any logs sure ? (you can send me in private email if you prefer)

            Thanks.

            Show
            olamy Olivier Lamy added a comment - I need to know when this happened during the build. Any logs sure ? (you can send me in private email if you prefer) Thanks.
            Hide
            dan_yell dan_yell added a comment -

            I don't have access to the logs at the moment, but I can probably send them to you in a couple of days when I'm back at work.

            Show
            dan_yell dan_yell added a comment - I don't have access to the logs at the moment, but I can probably send them to you in a couple of days when I'm back at work.
            Hide
            olamy Olivier Lamy added a comment -

            no problem.
            I think I have found the issue. I will push a SNAPSHOT version somewhere for you testing.

            Show
            olamy Olivier Lamy added a comment - no problem. I think I have found the issue. I will push a SNAPSHOT version somewhere for you testing.
            Hide
            olamy Olivier Lamy added a comment -

            Fixed.
            you can try with this build :
            wget http://people.apache.org/~olamy/hudson/main-maven3-support/hudson.war
            Thanks.

            Show
            olamy Olivier Lamy added a comment - Fixed. you can try with this build : wget http://people.apache.org/~olamy/hudson/main-maven3-support/hudson.war Thanks.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: Olivier Lamy
            Path:
            maven-plugin/pom.xml
            http://hudson-labs.org/commit/core/f9f90ba57a9c18afe8eb21d54a52d472bc794a5f
            Log:
            JENKINS-8387 Maven mirrors not used when project uses Maven 2.2
            upgrade hudson-maven-embedder to last SNAPSHOT

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: Olivier Lamy Path: maven-plugin/pom.xml http://hudson-labs.org/commit/core/f9f90ba57a9c18afe8eb21d54a52d472bc794a5f Log: JENKINS-8387 Maven mirrors not used when project uses Maven 2.2 upgrade hudson-maven-embedder to last SNAPSHOT
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: Olivier Lamy
            Path:
            changelog.html
            http://hudson-labs.org/commit/core/37df755be1cd01cb22ba2ad8826da71f1c000f17
            Log:
            add changelog for issue 8387 http://issues.jenkins-ci.org/browse/JENKINS-8387

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: Olivier Lamy Path: changelog.html http://hudson-labs.org/commit/core/37df755be1cd01cb22ba2ad8826da71f1c000f17 Log: add changelog for issue 8387 http://issues.jenkins-ci.org/browse/JENKINS-8387

              People

              Assignee:
              olamy Olivier Lamy
              Reporter:
              dan_yell dan_yell
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: