Given the mercurial plugin with parent org.jenkins-ci.plugins:plugin:1.400, but also reproducible with 1.461, Maven 3 mvn -B release:prepare fails with

      [INFO] Checking dependencies and plugins for snapshots ...
      [INFO] Transforming 'Jenkins Mercurial plugin'...
      Downloading: <CENTRAL_MIRROR>/org/jenkins-ci/tools/maven-hpi-plugin/1.74/maven-hpi-plugin-1.74.pom
      [WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 is missing, no dependency information available
      Downloading: <CENTRAL_MIRROR>/org/jenkins-ci/tools/maven-hpi-plugin/1.74/maven-hpi-plugin-1.74.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5.310s
      [INFO] Finished at: Fri Apr 27 19:30:03 EDT 2012
      [INFO] Final Memory: 10M/164M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project mercurial: Execution default-cli of goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare failed: Failed to build parent project for org.jenkins-ci.plugins:mercurial:hpi:1.39-SNAPSHOT: Some problems were encountered while processing the POMs:
      [ERROR] [ERROR] Unresolveable build extension: Plugin org.jenkins-ci.tools:maven-hpi-plugin:1.74 or one of its dependencies could not be resolved: Could not find artifact org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 in central (<CENTRAL_MIRROR>/) @: 1 problem was encountered while building the effective model for org.jenkins-ci.plugins:plugin:1.461
      [ERROR] [ERROR] Unresolveable build extension: Plugin org.jenkins-ci.tools:maven-hpi-plugin:1.74 or one of its dependencies could not be resolved: Could not find artifact org.jenkins-ci.tools:maven-hpi-plugin:jar:1.74 in central (<CENTRAL_MIRROR>/) @
      

      Indeed I think the error message is correct: plugin-1.400.pom (or again plugin-1.461.pom) refers to maven-hpi-plugin yet does not declare any <pluginRepository> in which it might be found. (Nor does its own parent.)

      Maven 2 succeeds in this case; apparently it does not care where the plugin came from. But Maven 3 as described in https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-ResolutionfromLocalRepository does care.

          [JENKINS-13637] Cannot release using M3

          Joe Hansche added a comment - - edited

          @jglick, is there a workaround to resolve this issue? Or is the only way to fix it to install M2?

          KK pointed me in the right direction: the problem was the missing <profiles> section of settings.xml. See https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-SettingUpEnvironment

          Joe Hansche added a comment - - edited @jglick, is there a workaround to resolve this issue? Or is the only way to fix it to install M2? KK pointed me in the right direction: the problem was the missing <profiles> section of settings.xml. See https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-SettingUpEnvironment

          Jesse Glick added a comment -

          Activating the Jenkins repos by default, which would affect any Maven projects, does not seem like a reasonable workaround; passing -Pjenkins during release:prepare would be an unpleasant but unacceptable workaround if that sufficed. A proper fix would be in plugin-*.pom to declare the pluginRepository it needs (or avoid using maven-hpi-plugin if it does not), so that the release plugin works without special configuration.

          Jesse Glick added a comment - Activating the Jenkins repos by default, which would affect any Maven projects, does not seem like a reasonable workaround; passing -Pjenkins during release:prepare would be an unpleasant but unacceptable workaround if that sufficed. A proper fix would be in plugin-*.pom to declare the pluginRepository it needs (or avoid using maven-hpi-plugin if it does not), so that the release plugin works without special configuration.

          blalor added a comment -

          I agree that modifying settings.xml is an unacceptable solution to the problem, since it requires making an environment-specific fix to the build environment.

          blalor added a comment - I agree that modifying settings.xml is an unacceptable solution to the problem, since it requires making an environment-specific fix to the build environment.

          Just hit this problem, and was forced to hack into settings.xml to work around it. This creates the situation where in our environment, it is not possible to build a jenkins plugin using a jenkins triggered build.

          Graham Leggett added a comment - Just hit this problem, and was forced to hack into settings.xml to work around it. This creates the situation where in our environment, it is not possible to build a jenkins plugin using a jenkins triggered build.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: