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

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

    • 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] }

          [JENKINS-46560] Maven "install" & "deploy" goals and Jenkins artifact archiving happens twice for *sources.jar

          Hello p3d_eng, we would be very surprised if the Maven event spy of the withMaven plugin did change the Maven build execution. The spy is only reading Maven data, it's not modifying anything (here).

          Can you try to bump the version of the maven-install-plugin from 2.4 to 2.5.2 and, if possible, to bump Maven to 3.5.0?

          Cyrille Le Clerc added a comment - Hello p3d_eng , we would be very surprised if the Maven event spy of the withMaven plugin did change the Maven build execution. The spy is only reading Maven data, it's not modifying anything ( here ). Can you try to bump the version of the maven-install-plugin from 2.4 to 2.5.2 and, if possible, to bump Maven to 3.5.0?

          delete me added a comment - - edited

          Hi cleclerc, thanks for looking into this.

          One thing I forgot in my report is that the install behaves correctly on my machine with maven 3.3.3.

          I did 3 more builds:

          • upgrade maven-install-plugin to 2.5.2
          • use maven 3.5
          • comment out maven-assembly-plugin to avoid the -standalone.jar (just in case)

          After the first it actually got worse; now the -standalone.jar gets installed/deployed/archived twice too.

          Here's the log (for the second build):

          Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
          Maven home: /home/jenkins/work/tools/hudson.tasks.Maven_MavenInstallation/Maven35
          Java version: 1.8.0_121, vendor: Oracle Corporation
          Java home: /home/jenkins/work/tools/hudson.model.JDK/Build_JDK/jre
          Default locale: en_US, platform encoding: UTF-8
          OS name: "linux", version: "2.6.32-642.15.1.el6.x86_64", arch: "amd64", family: "unix"
          ....
          [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ my-project ---
          [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT.jar to /home/jenkins/.m2/repository/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT.jar
          [INFO] Installing /home/jenkins/work/workspace/my-project/pom.xml to /home/jenkins/.m2/repository/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT.pom
          [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-sources.jar to /home/jenkins/.m2/repository/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-sources.jar
          [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-standalone.zip to /home/jenkins/.m2/repository/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-standalone.zip
          [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-sources.jar to /home/jenkins/.m2/repository/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-sources.jar
          [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-standalone.zip to /home/jenkins/.m2/repository/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-standalone.zip
          [INFO]
          [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ my-project ---
          [INFO] Downloading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml
          [INFO] Downloaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 11 kB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.jar
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.jar (449 kB at 4.2 MB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.pom
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.pom (12 kB at 303 kB/s)
          [INFO] Downloading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/maven-metadata.xml
          [INFO] Downloaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/maven-metadata.xml (423 B at 20 kB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 27 kB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/maven-metadata.xml
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/maven-metadata.xml (423 B at 11 kB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar (339 kB at 4.8 MB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 44 kB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip (3.0 MB at 17 MB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 28 kB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar (339 kB at 4.6 MB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 28 kB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip (3.0 MB at 13 MB/s)
          [INFO] Uploading: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml
          [INFO] Uploaded: http://myhost:8081/nexus/content/repositories/snapshots/my/package/my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 26 kB/s)
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD SUCCESS
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 42.733 s
          [INFO] Finished at: 2017-09-04T09:55:45+02:00
          [INFO] Final Memory: 28M/390M
          [INFO] ------------------------------------------------------------------------
          [jenkins-maven-event-spy] INFO generated /home/jenkins/work/workspace/my-project@tmp/withMaven299220d2/maven-spy-20170904-095502-652.log
          [Pipeline] }
          [withMaven] Archive artifact pom.xml under my/package/my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT.pom
          [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT.jar under my/package/my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3.jar
          [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-sources.jar under my/package/my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-sources.jar
          [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-standalone.zip under my/package/my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-standalone.zip
          [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-sources.jar under my/package/my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-sources.jar
          [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-standalone.zip under my/package/my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-standalone.zip
          

          delete me added a comment - - edited Hi cleclerc , thanks for looking into this. One thing I forgot in my report is that the install behaves correctly on my machine with maven 3.3.3. I did 3 more builds: upgrade maven-install-plugin to 2.5.2 use maven 3.5 comment out maven-assembly-plugin to avoid the -standalone.jar (just in case) After the first it actually got worse; now the -standalone.jar gets installed/deployed/archived twice too. Here's the log (for the second build): Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00) Maven home: /home/jenkins/work/tools/hudson.tasks.Maven_MavenInstallation/Maven35 Java version: 1.8.0_121, vendor: Oracle Corporation Java home: /home/jenkins/work/tools/hudson.model.JDK/Build_JDK/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" , version: "2.6.32-642.15.1.el6.x86_64" , arch: "amd64" , family: "unix" .... [INFO] --- maven-install-plugin:2.5.2:install ( default -install) @ my-project --- [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT.jar to /home/jenkins/.m2/repository/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT.jar [INFO] Installing /home/jenkins/work/workspace/my-project/pom.xml to /home/jenkins/.m2/repository/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT.pom [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-sources.jar to /home/jenkins/.m2/repository/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-sources.jar [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-standalone.zip to /home/jenkins/.m2/repository/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-standalone.zip [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-sources.jar to /home/jenkins/.m2/repository/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-sources.jar [INFO] Installing /home/jenkins/work/workspace/my-project/target/my-project-1.1-SNAPSHOT-standalone.zip to /home/jenkins/.m2/repository/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT-standalone.zip [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy ( default -deploy) @ my-project --- [INFO] Downloading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml [INFO] Downloaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 11 kB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.jar [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.jar (449 kB at 4.2 MB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.pom [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3.pom (12 kB at 303 kB/s) [INFO] Downloading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/maven-metadata.xml [INFO] Downloaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/maven-metadata.xml (423 B at 20 kB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 27 kB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/maven-metadata.xml [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/maven-metadata.xml (423 B at 11 kB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar (339 kB at 4.8 MB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 44 kB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip (3.0 MB at 17 MB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 28 kB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-sources.jar (339 kB at 4.6 MB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 28 kB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-20170904.075544-3-standalone.zip (3.0 MB at 13 MB/s) [INFO] Uploading: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml [INFO] Uploaded: http: //myhost:8081/nexus/content/repositories/snapshots/my/ package /my-project/1.1-SNAPSHOT/maven-metadata.xml (1.2 kB at 26 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 42.733 s [INFO] Finished at: 2017-09-04T09:55:45+02:00 [INFO] Final Memory: 28M/390M [INFO] ------------------------------------------------------------------------ [jenkins-maven-event-spy] INFO generated /home/jenkins/work/workspace/my-project@tmp/withMaven299220d2/maven-spy-20170904-095502-652.log [Pipeline] } [withMaven] Archive artifact pom.xml under my/ package /my-project/1.1-SNAPSHOT/my-project-1.1-SNAPSHOT.pom [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT.jar under my/ package /my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3.jar [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-sources.jar under my/ package /my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-sources.jar [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-standalone.zip under my/ package /my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-standalone.zip [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-sources.jar under my/ package /my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-sources.jar [withMaven] Archive artifact target/my-project-1.1-SNAPSHOT-standalone.zip under my/ package /my-project/1.1-20170904.075544-3/my-project-1.1-20170904.075544-3-standalone.zip

          p3d_eng Can you please attach

          • the full build logs
          • the log/report file generated by the maven spy as documented here
          • the pipeline script

          I'm sorry for the effort to redact all these files but it will help us a lot to understand what's happening. the log/report file of the maven spy will be key to help us

          Cyrille Le Clerc added a comment - p3d_eng Can you please attach the full build logs the log/report file generated by the maven spy as documented here the pipeline script I'm sorry for the effort to redact all these files but it will help us a lot to understand what's happening. the log/report file of the maven spy will be key to help us

          Cyrille Le Clerc added a comment - - edited

          WORK IN PROGRESS

          • org.apache.maven.plugins:maven-deploy-plugin:deploy invoked 1 time: MojoStarted, MojoSucceeded
          • org.apache.maven.plugins:maven-install-plugin:install invoked 1 time: MojoStarted, MojoSucceeded
          • my.group.id:my-project:java-source:sources:1.1-SNAPSHOT reported 2 times as an attached artifacts here and there
          • org.apache.maven.plugins:maven-source-plugin:jar invoked 2 times: here and there in forks (related to jacoco ?)
          • ">>> maven-source-plugin:2.4:jar (attach-sources)" appears 2 times in Maven execution logs here and there seem to be related to jacoco

          Cyrille Le Clerc added a comment - - edited WORK IN PROGRESS org.apache.maven.plugins:maven-deploy-plugin:deploy invoked 1 time: MojoStarted , MojoSucceeded org.apache.maven.plugins:maven-install-plugin:install invoked 1 time: MojoStarted , MojoSucceeded my.group.id:my-project:java-source:sources:1.1-SNAPSHOT reported 2 times as an attached artifacts here and there org.apache.maven.plugins:maven-source-plugin:jar invoked 2 times: here and there in forks (related to jacoco ?) ">>> maven-source-plugin:2.4:jar (attach-sources)" appears 2 times in Maven execution logs here and there seem to be related to jacoco

          delete me added a comment -

          Just a note: today I was able to update jenkins to 2.60.3 and Pipeline Maven Integration Plugin to 3.0.0, still the same.

          delete me added a comment - Just a note: today I was able to update jenkins to 2.60.3 and Pipeline Maven Integration Plugin to 3.0.0, still the same.

          p3d_eng, when you run the very same Maven build outside of "withMaven(){}", don't you see 2 times instead of once the message ">>> maven-source-plugin:2.4:jar (attach-sources)"? This is the sign that the goal "sources:jar" is invoked 2 times by the Maven build.

          Cyrille Le Clerc added a comment - p3d_eng , when you run the very same Maven build outside of "withMaven(){}", don't you see 2 times instead of once the message ">>> maven-source-plugin:2.4:jar (attach-sources)"? This is the sign that the goal "sources:jar" is invoked 2 times by the Maven build.

          delete me added a comment -

          Sorry for the delay. You're right, the plugin gets invoked twice, and the jar plugin too.
          After some more tests and trials I realized the problem emerge when I'm targeting both 'verify' and 'install'.
          At this point I suppose this must be a problem with my pom. Still not sure if it's related to jacoco configuration too.
          I'll report when fixed; probably this can be closed?

          delete me added a comment - Sorry for the delay. You're right, the plugin gets invoked twice, and the jar plugin too. After some more tests and trials I realized the problem emerge when I'm targeting both 'verify' and 'install'. At this point I suppose this must be a problem with my pom. Still not sure if it's related to jacoco configuration too. I'll report when fixed; probably this can be closed?

          Cyrille Le Clerc added a comment - - edited

          Thanks p3d_eng.

          As confirmed by p3d_eng, the problem resides in the Maven plugins and are reproduced outside of the "withMaven(){...}" plugin.
          This problem is real but it is caused by something in Maven, it's not related to the Jenkins Pipeline Maven Plugin.

          Cyrille Le Clerc added a comment - - edited Thanks p3d_eng . As confirmed by p3d_eng , the problem resides in the Maven plugins and are reproduced outside of the "withMaven(){...}" plugin. This problem is real but it is caused by something in Maven, it's not related to the Jenkins Pipeline Maven Plugin.

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

              Created:
              Updated:
              Resolved: