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

Maven "install" & "deploy" goals and Jenkins artifact archiving happens twice for *sources.jar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • pipeline-maven-plugin

      Apparently "mvn deploy" inside "withMaven(){ ... }" is trying to install and deploy -source.jar twice. Didn't notice this error before as it was the first time this was a non-snapshot version.

      Please advise for additional informations if required.

      Thanks

      Relevant log:

      [INFO] --- maven-install-plugin:2.4:install (default-install) @ my-project ---
      [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.0.jar to /home/jenkins/.m2/repository/my/java/package/1.0/my-project-1.0.jar
      [INFO] Installing /home/jenkins/work/workspace/my-project/pom.xml to /home/jenkins/.m2/repository/my/java/package/1.0/my-project-1.0.pom
      [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.0-sources.jar to /home/jenkins/.m2/repository/my/java/package/1.0/my-project-1.0-sources.jar
      [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.0-standalone.zip to /home/jenkins/.m2/repository/my/java/package/1.0/my-project-1.0-standalone.zip
      [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.0-sources.jar to /home/jenkins/.m2/repository/my/java/package/1.0/my-project-1.0-sources.jar
      [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.0-standalone.zip to /home/jenkins/.m2/repository/my/java/package/1.0/my-project-1.0-standalone.zip
      [INFO]
      [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ my-project ---
      [INFO] Uploading: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0.jar
      [INFO] Uploaded: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0.jar (438 KB at 1738.0 KB/sec)
      [INFO] Uploading: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0.pom
      [INFO] Uploaded: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0.pom (12 KB at 387.0 KB/sec)
      [INFO] Downloading: http://myhost/nexus/content/repositories/releases/my/java/package/maven-metadata.xml
      [INFO] Uploading: http://myhost/nexus/content/repositories/releases/my/java/package/maven-metadata.xml
      [INFO] Uploaded: http://myhost/nexus/content/repositories/releases/my/java/package/maven-metadata.xml (305 B at 9.6 KB/sec)
      [INFO] Uploading: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0-sources.jar
      [INFO] Uploaded: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0-sources.jar (332 KB at 8947.3 KB/sec)
      [INFO] Uploading: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0-standalone.zip
      [INFO] Uploaded: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0-standalone.zip (2902 KB at 20580.9 KB/sec)
      [INFO] Uploading: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0-sources.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 54.615 s
      [INFO] Finished at: 2017-08-30T17:00:46+02:00
      [INFO] Final Memory: 27M/384M
      [INFO] ------------------------------------------------------------------------
      [jenkins-maven-event-spy] INFO generated /home/jenkins/work/workspace/my-project@tmp/withMaven3b30e963/maven-spy-20170830-165951-820.log
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project my-project: Failed to deploy artifacts: Could not transfer artifact my.java.package:my-project:jar:sources:1.0 from/to inmind-repository (http://myhost/nexus/content/repositories/releases/): Failed to transfer file: http://myhost/nexus/content/repositories/releases/my/java/package/1.0/my-project-1.0-sources.jar. Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      [Pipeline] }

            cleclerc Cyrille Le Clerc
            p3d_eng delete me
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: