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

Artifactory Release Staging failing due to missing SNAPSHOT

    Details

    • Similar Issues:

      Description

      I am trying to release using artifactory plugin- Release Management plugin.

      I am able to generate the snapshot version with the build such as 1.0.0-SNAPSHOT

      When I am running the staging build, using 'artifacrory release staging'option, it is failign with below error:

       
      Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project: You don't have a SNAPSHOT project in the reactor projects list. -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project radon: You don't have a SNAPSHOT project in the reactor projects list.
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
      at hudson.remoting.UserRequest.perform(UserRequest.java:152)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:332)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.maven.plugin.MojoFailureException: You don't have a SNAPSHOT project in the reactor projects list.
      at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:294)
      at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:240)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      ... 30 more
      Caused by: org.apache.maven.shared.release.ReleaseFailureException: You don't have a SNAPSHOT project in the reactor projects list.
      at org.apache.maven.shared.release.phase.CheckPomPhase.execute(CheckPomPhase.java:120)
      at org.apache.maven.shared.release.phase.CheckPomPhase.simulate(CheckPomPhase.java:133)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:228)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
      at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
      at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:286)

        Attachments

          Activity

          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          I am able to generate the snapshot version from the snapshot build and it successfully publishing it to the snapshot repo as well

          Show
          mahendra_singh1260 Mahendra Singh added a comment - I am able to generate the snapshot version from the snapshot build and it successfully publishing it to the snapshot repo as well
          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          maven goal I am giving :

          -U -e -X -Dresume=false   -DuseReleaseProfile=fals  release:prepare release:perform

          Show
          mahendra_singh1260 Mahendra Singh added a comment - maven goal I am giving : -U -e -X -Dresume=false   -DuseReleaseProfile=fals  release:prepare release:perform
          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          Any lead?

          Show
          mahendra_singh1260 Mahendra Singh added a comment - Any lead?
          Hide
          eyalbe Eyal Ben Moshe added a comment -

          The issue might be caused as a result of the fact that you are using a "Maven Release Plugin" Maven goals for the "Artifactory Release Staging" functionality. For Artifactory Release Staging, please make sure you use the install goal only. Let me know if this resolves the issue.

          Show
          eyalbe Eyal Ben Moshe added a comment - The issue might be caused as a result of the fact that you are using a "Maven Release Plugin" Maven goals for the "Artifactory Release Staging" functionality. For Artifactory Release Staging, please make sure you use the install goal only. Let me know if this resolves the issue.
          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          I am using maven release plugin in my pom file with below configuration:

          <build>
              <plugins>
                 <plugin>
                     <artifactId>maven-scm-plugin</artifactId>
                     <version>1.8.1</version>
                 </plugin>
                 <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    _          <configuration>_
                       <preparationGoals>clean install</preparationGoals>
                       <goals>clean install</goals>
                   _         </configuration>_

                </plugin>
              </plugins>

          </build>

          It is still not working after I make it clean install

          any idea? what is that I am missing?

          Show
          mahendra_singh1260 Mahendra Singh added a comment - I am using maven release plugin in my pom file with below configuration: <build>     <plugins>         <plugin>             <artifactId>maven-scm-plugin</artifactId>             <version>1.8.1</version>         </plugin>         <plugin>           <artifactId>maven-release-plugin</artifactId>           <version>2.5.3</version>            _            <configuration>_               <preparationGoals>clean install</preparationGoals>               <goals>clean install</goals>           _           </configuration>_       </plugin>     </plugins> </build> It is still not working after I make it clean install any idea? what is that I am missing?
          Hide
          eyalbe Eyal Ben Moshe added a comment -

          The issue is caused by a conflict between the maven-release-plugin and the Artifactory Release Staging feature in Jenkins.

          The two cannot work together, because both of them attempt to change the snapshot version into a release version. You'll need to choose which of the two you'd like to use. If you choose the Artifactory Release Staging feature (which we use as part of our CI/CD pipeline for many years), you'll have to remove the maven-release-plugin from the pom file and configure the "install" goal in your job configuration.

          Show
          eyalbe Eyal Ben Moshe added a comment - The issue is caused by a conflict between the maven-release-plugin and the Artifactory Release Staging feature in Jenkins. The two cannot work together, because both of them attempt to change the snapshot version into a release version. You'll need to choose which of the two you'd like to use. If you choose the Artifactory Release Staging feature (which we use as part of our CI/CD pipeline for many years), you'll have to remove the maven-release-plugin from the pom file and configure the "install" goal in your job configuration.
          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          Thanks Eyal, it worked now  thank you so mucn

          I gave the 'install' goal in the JEnkins config and it worked well

          Show
          mahendra_singh1260 Mahendra Singh added a comment - Thanks Eyal, it worked now  thank you so mucn I gave the 'install' goal in the JEnkins config and it worked well
          Hide
          mahendra_singh1260 Mahendra Singh added a comment -

          Removing maven releave plugin and changing rhe goal to install resolved the issue

          Show
          mahendra_singh1260 Mahendra Singh added a comment - Removing maven releave plugin and changing rhe goal to install resolved the issue

            People

            • Assignee:
              eyalbe Eyal Ben Moshe
              Reporter:
              mahendra_singh1260 Mahendra Singh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: