Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-373

Artifactory Plugin causes Maven Release Plugin failure

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 2.2.2
    • Component/s: Maven2, Maven3
    • Labels:
      None
    • Environment:

      Jenkins LTS 1.480.2

      Description

      Hi,

      The artifactory plugin causes a build failure while performing a release with the Maven Release plugin.
      At the end of the build Artifactory tries to upload the old snapshot instead of deploying the new one.

      The issue has already been reported here HAP-93 and fixed for version 1.3.5, it seems to be a regression.
      Artifactory used to detect the release build and skip the uploading phase.

      However, the release versions are correctly uploaded to Artifactory during the maven-deploy phase.

      Here is the stack trace :

      mojoSucceeded org.apache.maven.plugins:maven-release-plugin:2.3.2(default-cli)
      projectSucceeded ****:0.1.3-SNAPSHOT
      [INFO] Artifactory Build Info Recorder: Deploying artifacts to http://****/libs-release-local
      [INFO] Deploying artifact: http://****/libs-snapshot-local/****/****-0.1.3-SNAPSHOT.pom
      mavenExecutionResult exceptions not empty
      message : Internal error: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: ****\pom.xml.
       Skipping deployment of remaining artifacts (if any) and build info.
      cause : Error occurred while publishing artifact to Artifactory: ****\pom.xml.
       Skipping deployment of remaining artifacts (if any) and build info.
      Stack trace : 
      org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: ****\pom.xml.
       Skipping deployment of remaining artifacts (if any) and build info.
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
      	at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
      	at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: ****\pom.xml.
       Skipping deployment of remaining artifacts (if any) and build info.
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:135)
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:78)
      	at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:130)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	... 19 more
      Caused by: java.io.IOException: Failed to deploy file: HTTP response code: 409. HTTP response message: The target deployment path '****-0.1.3-20130123.161654-2.pom' does not match the POM's expected path prefix '****/0.1.4-SNAPSHOT'. Please verify your POM content for correctness and make sure the source path is a valid Maven repository root path.
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:642)
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:517)
      	at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:292)
      	at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:133)
      	... 26 more
      channel stopped
      Finished: FAILURE
      

        Attachments

          Activity

            People

            • Assignee:
              liorha Lior Hasson
              Reporter:
              ophelie_saf Ophélie Salm
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: