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

Regression in jenkins .401 maven plugin - deploy to repository post-task

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • jenkins .401

      After upgrading to latest jenkins .401 the post-build task deploy to maven repository has resurfaced:

      Failed to transfer file: http://xxxx/nexus/content/repositories/snapshots/some/artifact-1.2-20110317.153602-23.pom. Return code is: 401

      This worked before upgrading.
      I put in the url to deploy to + the server id in settings.xml containing the credentials

          [JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task

          Olivier Lamy added a comment -

          the settings.xml is where in the master or in the node ?
          BTW I have fixed some stuff recently regarding this.
          Can you try with a jenkins build from master sources ?
          Or using this one : http://ci.jenkins-ci.org/view/Jenkins%20core/job/jenkins_main_trunk/lastSuccessfulBuild/artifact/war/target/jenkins.war

          Olivier Lamy added a comment - the settings.xml is where in the master or in the node ? BTW I have fixed some stuff recently regarding this. Can you try with a jenkins build from master sources ? Or using this one : http://ci.jenkins-ci.org/view/Jenkins%20core/job/jenkins_main_trunk/lastSuccessfulBuild/artifact/war/target/jenkins.war

          David Karlsen added a comment - - edited

          settings.xml is in the same location as before the upgrade (e.g. when this worked just fine) - and that is in MAVEN_HOME/conf/settings.xml.
          Last time I tried updating jenkins.war it broke kind of badly - and due to our operations situation it is not very easy and swift - so a little reluctant - but i can see what's possible and not.

          David Karlsen added a comment - - edited settings.xml is in the same location as before the upgrade (e.g. when this worked just fine) - and that is in MAVEN_HOME/conf/settings.xml. Last time I tried updating jenkins.war it broke kind of badly - and due to our operations situation it is not very easy and swift - so a little reluctant - but i can see what's possible and not.

          Olivier Lamy added a comment -

          do you have settings file with correct karma for deploying in ~/.m2/settings.xml ?

          Olivier Lamy added a comment - do you have settings file with correct karma for deploying in ~/.m2/settings.xml ?

          David Karlsen added a comment -

          No - I have them under the MAVEN_HOME/conf (overwriting the one in the distro).
          Don't want to have them in maven repos as I usually use "private maven repository" option.

          David Karlsen added a comment - No - I have them under the MAVEN_HOME/conf (overwriting the one in the distro). Don't want to have them in maven repos as I usually use "private maven repository" option.

          Olivier Lamy added a comment -

          ok I see. So I have to change the logic I have added recently to fix the use private maven repository option.

          Olivier Lamy added a comment - ok I see. So I have to change the logic I have added recently to fix the use private maven repository option.

          Olivier Lamy added a comment -

          So as discussed a workaround you can put you settings.xml in ~/.m2 of your nodes.
          Note for myself : change the logic here https://github.com/jenkinsci/jenkins/blob/master/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java#L185 and if not remote : ~/.m2/settings.xml use remote : $M2_HOME/conf/settings.xml ($M2_HOME is remote path for maven installation used)

          Olivier Lamy added a comment - So as discussed a workaround you can put you settings.xml in ~/.m2 of your nodes. Note for myself : change the logic here https://github.com/jenkinsci/jenkins/blob/master/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java#L185 and if not remote : ~/.m2/settings.xml use remote : $M2_HOME/conf/settings.xml ($M2_HOME is remote path for maven installation used)

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/jenkins/0868af63972351c8fdf051fbc3673aa1be03e5a2
          Log:
          [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task
          logic to get remote settings.xml file, test in this order (as maven do)
          1. configured alternateSettings
          2. ~/.m2/settings.xml
          3. $M2_HOME/conf/settings.xml

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/jenkins/0868af63972351c8fdf051fbc3673aa1be03e5a2 Log: [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task logic to get remote settings.xml file, test in this order (as maven do) 1. configured alternateSettings 2. ~/.m2/settings.xml 3. $M2_HOME/conf/settings.xml

          dogfood added a comment -

          Integrated in jenkins_main_trunk #612
          [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task

          Olivier Lamy : 0868af63972351c8fdf051fbc3673aa1be03e5a2
          Files :

          • maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java

          dogfood added a comment - Integrated in jenkins_main_trunk #612 [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task Olivier Lamy : 0868af63972351c8fdf051fbc3673aa1be03e5a2 Files : maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java

          David Karlsen added a comment -

          Is this part of core so we have to await a new release?

          David Karlsen added a comment - Is this part of core so we have to await a new release?

          Olivier Lamy added a comment -

          yup maven-plugin is bundled with core.

          Olivier Lamy added a comment - yup maven-plugin is bundled with core.

          David Karlsen added a comment - - edited

          Still not working in 1.403.
          All in all jenkins seems very unstable and fragile.
          How is stuff tested (or is it tested at all?)

          0:55:01  channel stopped
          20:55:01  Deploying artifacts to http://nexus.edb.com/nexus/content/repositories/snapshots
          20:55:02  uniqueVersion == false is not anymore supported in maven 3
          20:55:02  Deploying the main artifact pom.xml
          20:55:02  ERROR: Failed to deploy artifacts: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401
          20:55:02  org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401
          20:55:02  	at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
          20:55:02  	at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:136)
          20:55:02  	at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:140)
          20:55:02  	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          20:55:02  	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:644)
          20:55:02  	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:623)
          20:55:02  	at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:818)
          20:55:02  	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:570)
          20:55:02  	at hudson.model.Run.run(Run.java:1386)
          20:55:02  	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:440)
          20:55:02  	at hudson.model.ResourceController.execute(ResourceController.java:88)
          20:55:02  	at hudson.model.Executor.run(Executor.java:145)
          20:55:02  Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401
          20:55:02  	at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
          20:55:02  	at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
          20:55:02  	at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
          20:55:02  	at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
          20:55:02  	... 11 more
          20:55:02  Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401
          20:55:02  	at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
          20:55:02  	at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
          20:55:02  	at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
          20:55:02  	at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
          20:55:02  	at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
          20:55:02  	... 14 more
          20:55:02  Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401
          20:55:02  	at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:205)
          20:55:02  	at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413)
          20:55:02  	at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392)
          20:55:02  	at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365)
          20:55:02  	at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
          20:55:02  	at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
          20:55:02  	at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
          20:55:02  	... 15 more
          20:55:02  [TASKS] Skipping publisher since build result is FAILURE
          20:55:02  [FINDBUGS] Skipping publisher since build result is FAILURE
          
          

          David Karlsen added a comment - - edited Still not working in 1.403. All in all jenkins seems very unstable and fragile. How is stuff tested (or is it tested at all?) 0:55:01 channel stopped 20:55:01 Deploying artifacts to http://nexus.edb.com/nexus/content/repositories/snapshots 20:55:02 uniqueVersion == false is not anymore supported in maven 3 20:55:02 Deploying the main artifact pom.xml 20:55:02 ERROR: Failed to deploy artifacts: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401 20:55:02 org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401 20:55:02 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141) 20:55:02 at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:136) 20:55:02 at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:140) 20:55:02 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) 20:55:02 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:644) 20:55:02 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:623) 20:55:02 at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:818) 20:55:02 at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:570) 20:55:02 at hudson.model.Run.run(Run.java:1386) 20:55:02 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:440) 20:55:02 at hudson.model.ResourceController.execute(ResourceController.java:88) 20:55:02 at hudson.model.Executor.run(Executor.java:145) 20:55:02 Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401 20:55:02 at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284) 20:55:02 at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215) 20:55:02 at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480) 20:55:02 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137) 20:55:02 ... 11 more 20:55:02 Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.edb.payment.pays:pays-core:pom:1.2-20110322.195502-51 from/to edb.snapshotRepostory (http://nexus.edb.com/nexus/content/repositories/snapshots): Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401 20:55:02 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949) 20:55:02 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940) 20:55:02 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864) 20:55:02 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466) 20:55:02 at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278) 20:55:02 ... 14 more 20:55:02 Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://nexus.edb.com/nexus/content/repositories/snapshots/com/edb/payment/pays/pays-core/1.2-SNAPSHOT/pays-core-1.2-20110322.195502-51.pom. Return code is: 401 20:55:02 at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:205) 20:55:02 at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413) 20:55:02 at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392) 20:55:02 at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365) 20:55:02 at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163) 20:55:02 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825) 20:55:02 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465) 20:55:02 ... 15 more 20:55:02 [TASKS] Skipping publisher since build result is FAILURE 20:55:02 [FINDBUGS] Skipping publisher since build result is FAILURE

          Olivier Lamy added a comment -

          the fix committed on 19/Mar is for 1.404.
          BTW if you have some time to test current master or current rc branch, you are welcome.
          And yes it's tested (currently not automatically but manually)

          Olivier Lamy added a comment - the fix committed on 19/Mar is for 1.404. BTW if you have some time to test current master or current rc branch, you are welcome. And yes it's tested (currently not automatically but manually)

          David Karlsen added a comment -

          Upgraded to .404 today - and it now works on the slaves.
          But I get this error on the master:

          Deploying artifacts to http://nexus.xxx.com/nexus/content/repositories/snapshots
          ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception
          java.lang.NullPointerException
          	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96)
          	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149)
          	at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510)
          	at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204)
          	at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129)
          	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649)
          	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625)
          	at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:838)
          	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572)
          	at hudson.model.Run.run(Run.java:1386)
          	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:145)
          [TASKS] Skipping publisher since build result is FAILURE
          [FINDBUGS] Skipping publisher since build result is FAILURE
          

          David Karlsen added a comment - Upgraded to .404 today - and it now works on the slaves. But I get this error on the master: Deploying artifacts to http://nexus.xxx.com/nexus/content/repositories/snapshots ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception java.lang.NullPointerException at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149) at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510) at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:838) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572) at hudson.model.Run.run(Run.java:1386) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) [TASKS] Skipping publisher since build result is FAILURE [FINDBUGS] Skipping publisher since build result is FAILURE

          Upgraded to 1.404 yesterday, and we got the exact same problem.

          07:49:35 Deploying artifacts to *****
          07:49:35 ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception
          07:49:35 java.lang.NullPointerException
          07:49:35 at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96)
          07:49:35 at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149)
          07:49:35 at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510)
          07:49:35 at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204)
          07:49:35 at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129)
          07:49:35 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          07:49:35 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649)
          07:49:35 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625)
          07:49:35 at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:838)
          07:49:35 at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572)
          07:49:35 at hudson.model.Run.run(Run.java:1386)
          07:49:35 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454)
          07:49:35 at hudson.model.ResourceController.execute(ResourceController.java:88)
          07:49:35 at hudson.model.Executor.run(Executor.java:145)
          07:49:35 Skipping sonar analysis due to bad build status FAILURE
          07:49:35 Finished: FAILURE

          Bjørn Skulstad added a comment - Upgraded to 1.404 yesterday, and we got the exact same problem. 07:49:35 Deploying artifacts to ***** 07:49:35 ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception 07:49:35 java.lang.NullPointerException 07:49:35 at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96) 07:49:35 at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149) 07:49:35 at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510) 07:49:35 at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204) 07:49:35 at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129) 07:49:35 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) 07:49:35 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649) 07:49:35 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625) 07:49:35 at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:838) 07:49:35 at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572) 07:49:35 at hudson.model.Run.run(Run.java:1386) 07:49:35 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454) 07:49:35 at hudson.model.ResourceController.execute(ResourceController.java:88) 07:49:35 at hudson.model.Executor.run(Executor.java:145) 07:49:35 Skipping sonar analysis due to bad build status FAILURE 07:49:35 Finished: FAILURE

          Jim McCaskey added a comment -

          Same problem with 1.404 on the master (I have no slaves running Maven builds). I was on 1.400 with no problems. Had to revert, after which life went back to normal.

          ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception
          java.lang.NullPointerException
          at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96)
          at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149)
          at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510)
          at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204)
          at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625)
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:838)
          at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572)
          at hudson.model.Run.run(Run.java:1386)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:145)

          Jim McCaskey added a comment - Same problem with 1.404 on the master (I have no slaves running Maven builds). I was on 1.400 with no problems. Had to revert, after which life went back to normal. ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception java.lang.NullPointerException at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149) at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510) at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:838) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572) at hudson.model.Run.run(Run.java:1386) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145)

          Code changed in jenkins
          User: Martijn Baay
          Path:
          maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/jenkins/fe9347435fd326cdd3bc2b7482d4b10922f1c160
          Log:
          Fixed JENKINS-9084: Made sure the correct slave is detected even when it's the Master

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Martijn Baay Path: maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/jenkins/fe9347435fd326cdd3bc2b7482d4b10922f1c160 Log: Fixed JENKINS-9084 : Made sure the correct slave is detected even when it's the Master

          probably a similar issue?
          No problems with version 1.403, however 1.404 and 1.405 both trow the following error.

          Deploying artifacts to file:///var/www/maven/repository/
          ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception
          java.lang.NullPointerException
          at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96)
          at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149)
          at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510)
          at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204)
          at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625)
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:868)
          at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572)
          at hudson.model.Run.run(Run.java:1386)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:145)

          Richard Finkers added a comment - probably a similar issue? No problems with version 1.403, however 1.404 and 1.405 both trow the following error. Deploying artifacts to file:///var/www/maven/repository/ ERROR: Publisher hudson.maven.RedeployPublisher aborted due to exception java.lang.NullPointerException at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:96) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149) at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:510) at hudson.maven.RedeployPublisher.createEmbedder(RedeployPublisher.java:204) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:129) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:649) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:625) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:868) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:572) at hudson.model.Run.run(Run.java:1386) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:454) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145)

          Olivier Lamy added a comment -

          a better fix will be in 1.406.
          If you want to test this use the jenkins.war from here : http://people.apache.org/~olamy/jenkins/

          Olivier Lamy added a comment - a better fix will be in 1.406. If you want to test this use the jenkins.war from here : http://people.apache.org/~olamy/jenkins/

          On the 13 of April I upgrade from hudson to jenkins 1.406. My hudson installation has been running for months withour problems. On the 14 of April I noticed that all the jobs running on the slave failed because the upload to NEXUS returned 401. I have two builders on the master and 1 builder on a slave running on the same server as the master. When I disable the slave all build pass since they now all run on the master.

          Henrik Gerdtsson added a comment - On the 13 of April I upgrade from hudson to jenkins 1.406. My hudson installation has been running for months withour problems. On the 14 of April I noticed that all the jobs running on the slave failed because the upload to NEXUS returned 401. I have two builders on the master and 1 builder on a slave running on the same server as the master. When I disable the slave all build pass since they now all run on the master.

          Olivier Lamy added a comment -

          @Henrik could you give us more details ?
          when you say "1 builder on a slave running on the same server as the master" is it with same uid ?
          if not is there same content in both ~/.m2/settings.xml ?

          Olivier Lamy added a comment - @Henrik could you give us more details ? when you say "1 builder on a slave running on the same server as the master" is it with same uid ? if not is there same content in both ~/.m2/settings.xml ?

          Arun Kumar added a comment -

          Hi All,

          I am using Jenkins version 1.408 with artifactory version 2.3.2.

          Strangely, it was working smoothly before, but recent upgrade/s of jenkins/plugin and/or artifactory created this problem.

          Do let me know, if anyone found solution. Is there any way that we downgrade version of jenkins and/or artifactory, which will help resolve this issue.

          Below is the log, you may need to get an idea of problem.

          org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project demo-setup: Failed to deploy artifacts: Could not transfer artifact com.abc.xyz.demo-setup-setup:jar:1.0 from/to MYSERVER (http://MYSERVER:8081/artifactory/libs-releases-local): Failed to transfer file: http://MYSERVER:8081/artifactory/libs-releases-local/com/abc/xyz/demo-setup/1.0/demo-setup-1.0.jar. Return code is: 401
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
          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:84)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          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:146)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:126)
          at hudson.maven.Maven3Builder.call(Maven3Builder.java:73)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:270)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          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:619)
          Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact com.abc.xyz:demo-setup:jar:1.0 from/to MYSERVER

          Arun Kumar added a comment - Hi All, I am using Jenkins version 1.408 with artifactory version 2.3.2. Strangely, it was working smoothly before, but recent upgrade/s of jenkins/plugin and/or artifactory created this problem. Do let me know, if anyone found solution. Is there any way that we downgrade version of jenkins and/or artifactory, which will help resolve this issue. Below is the log, you may need to get an idea of problem. org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project demo-setup: Failed to deploy artifacts: Could not transfer artifact com.abc.xyz.demo-setup-setup:jar:1.0 from/to MYSERVER ( http://MYSERVER:8081/artifactory/libs-releases-local): Failed to transfer file: http://MYSERVER:8081/artifactory/libs-releases-local/com/abc/xyz/demo-setup/1.0/demo-setup-1.0.jar . Return code is: 401 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 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:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 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:146) at hudson.maven.Maven3Builder.call(Maven3Builder.java:126) at hudson.maven.Maven3Builder.call(Maven3Builder.java:73) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 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:619) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact com.abc.xyz:demo-setup:jar:1.0 from/to MYSERVER

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/jenkins/0868af63972351c8fdf051fbc3673aa1be03e5a2
          Log:
          [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task
          logic to get remote settings.xml file, test in this order (as maven do)
          1. configured alternateSettings
          2. ~/.m2/settings.xml
          3. $M2_HOME/conf/settings.xml

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/jenkins/0868af63972351c8fdf051fbc3673aa1be03e5a2 Log: [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task logic to get remote settings.xml file, test in this order (as maven do) 1. configured alternateSettings 2. ~/.m2/settings.xml 3. $M2_HOME/conf/settings.xml

          Code changed in jenkins
          User: Martijn Baay
          Path:
          maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/jenkins/fe9347435fd326cdd3bc2b7482d4b10922f1c160
          Log:
          Fixed JENKINS-9084: Made sure the correct slave is detected even when it's the Master

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Martijn Baay Path: maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/jenkins/fe9347435fd326cdd3bc2b7482d4b10922f1c160 Log: Fixed JENKINS-9084 : Made sure the correct slave is detected even when it's the Master

          Since the last Jenkins upgrade to 1.442, all our maven jobs
          are failing during the post-build deploy to repository step. Nothing has changed in the maven configuration. The
          repositoy manager (nexus) seems OK as I can still deploy artifacts when
          running a mvn deploy on the same machine where Jenkins is running. Following is the "anonymized"
          stacktrace of a failing jenkins job :

          [INFO]
          ------------------------------------------------------------------------
          [INFO] BUILD SUCCESSFUL
          [INFO]
          ------------------------------------------------------------------------
          [INFO] Total time: 20 seconds
          [INFO] Finished at: Wed Dec 07 10:50:54 CET 2011
          [INFO] Final Memory: 25M/61M
          [INFO]
          ------------------------------------------------------------------------
          channel stopped
          Maven RedeployPublished use remote  maven settings from : /var/lib/
          jenkins/.m2/settings.xml
          [INFO] Deployment in http://my-server/snapshots (id=my-company-
          snapshots,uniqueVersion=true)
          Déploiement de l'artefact principal my-artifact-0.0.2-SNAPSHOT.jar
          Downloading: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/maven-metadata.xml
          Downloaded: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/maven-metadata.xml
          (789 B at 8.4 KB/sec)
          Uploading: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar
          Uploading: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.pom
          ERROR: Failed to deploy artifacts: Could not transfer artifact com.my-
          company:my-artifact:jar:0.0.2-20111207.095055-6 from/to my-company-
          snapshots (http://my-server/snapshots): Failed to transfer file:
          http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar.
          Return code is: 401
          org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed
          to deploy artifacts: Could not transfer artifact com.my-company:my-
          artifact:jar:0.0.2-20111207.095055-6 from/to my-company-snapshots
          (http://my-server/snapshots): Failed to transfer file:
          http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar.
          Return code is: 401
                 at
          org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:
          141)
                 at
          hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:
          182)
                 at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
                 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
                 at hudson.model.AbstractBuild
          $AbstractRunner.perform(AbstractBuild.java:692)
                 at hudson.model.AbstractBuild
          $AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
                 at hudson.maven.MavenModuleSetBuild
          $RunnerImpl.post2(MavenModuleSetBuild.java:1014)
                 at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:
          614)
                 at hudson.model.Run.run(Run.java:1429)
                 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
                 at hudson.model.ResourceController.execute(ResourceController.java:
          88)
                 at hudson.model.Executor.run(Executor.java:238)
          Caused by: org.sonatype.aether.deployment.DeploymentException: Failed
          to deploy artifacts: Could not transfer artifact com.my-company:my-
          artifact:jar:0.0.2-20111207.095055-6 from/to my-company-snapshots
          (http://my-server/snapshots): Failed to transfer file:
          http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar.
          Return code is: 401
                 at
          org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:
          280)
                 at
          org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:
          211)
                 at
          org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:
          443)
                 at
          org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:
          137)
                 ... 11 more
          Caused by: org.sonatype.aether.transfer.ArtifactTransferException:
          Could not transfer artifact com.my-company:my-artifact:jar:
          0.0.2-20111207.095055-6 from/to my-company-snapshots (http://my-server/
          snapshots): Failed to transfer file:
          http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar.
          Return code is: 401
                 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector
          $4.wrap(WagonRepositoryConnector.java:950)
                 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector
          $4.wrap(WagonRepositoryConnector.java:940)
                 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector
          $PutTask.run(WagonRepositoryConnector.java:837)
                 at
          org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:
          467)
                 at
          org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:
          274)
                 ... 14 more
          Caused by: org.apache.maven.wagon.TransferFailedException: Failed to
          transfer file: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar.
          Return code is: 401
                 at
          org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:
          256)
                 at
          org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:
          413)
                 at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:
          392)
                 at
          org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:
          365)
                 at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
                 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector
          $PutTask.run(WagonRepositoryConnector.java:811)
                 ... 16 more
          [INFO] Deployment failed after 0,35 s
          Build step 'Déployer les artefacts dans le repository Maven' changed
          build result to FAILURE
          Skipping Cobertura coverage report as build was not SUCCESS or
          better ...
          Sending e-mails to: admin@my-company.com
          Finished: FAILURE

          For the moment I found a work around to this problem by deactivating deploy to repository post-task and specifying deploy instead of install in the maven goal configuration input

          Jean-Louis Jouannic added a comment - Since the last Jenkins upgrade to 1.442, all our maven jobs are failing during the post-build deploy to repository step. Nothing has changed in the maven configuration. The repositoy manager (nexus) seems OK as I can still deploy artifacts when running a mvn deploy on the same machine where Jenkins is running. Following is the "anonymized" stacktrace of a failing jenkins job : [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20 seconds [INFO] Finished at: Wed Dec 07 10:50:54 CET 2011 [INFO] Final Memory: 25M/61M [INFO] ------------------------------------------------------------------------ channel stopped Maven RedeployPublished use remote maven settings from : /var/lib/ jenkins/.m2/settings.xml [INFO] Deployment in http://my-server/snapshots (id=my-company- snapshots,uniqueVersion=true) Déploiement de l'artefact principal my-artifact-0.0.2-SNAPSHOT.jar Downloading: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/maven-metadata.xml Downloaded: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/maven-metadata.xml (789 B at 8.4 KB/sec) Uploading: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar Uploading: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.pom ERROR: Failed to deploy artifacts: Could not transfer artifact com.my- company:my-artifact:jar:0.0.2-20111207.095055-6 from/to my-company- snapshots (http://my-server/snapshots): Failed to transfer file: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar. Return code is: 401 org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.my-company:my- artifact:jar:0.0.2-20111207.095055-6 from/to my-company-snapshots (http://my-server/snapshots): Failed to transfer file: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar. Return code is: 401 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java: 141) at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java: 182) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild $AbstractRunner.perform(AbstractBuild.java:692) at hudson.model.AbstractBuild $AbstractRunner.performAllBuildSteps(AbstractBuild.java:667) at hudson.maven.MavenModuleSetBuild $RunnerImpl.post2(MavenModuleSetBuild.java:1014) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java: 614) at hudson.model.Run.run(Run.java:1429) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481) at hudson.model.ResourceController.execute(ResourceController.java: 88) at hudson.model.Executor.run(Executor.java:238) Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.my-company:my- artifact:jar:0.0.2-20111207.095055-6 from/to my-company-snapshots (http://my-server/snapshots): Failed to transfer file: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar. Return code is: 401 at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java: 280) at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java: 211) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java: 443) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java: 137) ... 11 more Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.my-company:my-artifact:jar: 0.0.2-20111207.095055-6 from/to my-company-snapshots (http://my-server/ snapshots): Failed to transfer file: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar. Return code is: 401 at org.sonatype.aether.connector.wagon.WagonRepositoryConnector $4.wrap(WagonRepositoryConnector.java:950) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector $4.wrap(WagonRepositoryConnector.java:940) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector $PutTask.run(WagonRepositoryConnector.java:837) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java: 467) at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java: 274) ... 14 more Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://my-server/snapshots/com/my-company/my-artifact/0.0.2-SNAPSHOT/my-artifact-0.0.2-20111207.095055-6.jar. Return code is: 401 at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java: 256) at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java: 413) at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java: 392) at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java: 365) at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector $PutTask.run(WagonRepositoryConnector.java:811) ... 16 more [INFO] Deployment failed after 0,35 s Build step 'Déployer les artefacts dans le repository Maven' changed build result to FAILURE Skipping Cobertura coverage report as build was not SUCCESS or better ... Sending e-mails to: admin@my-company.com Finished: FAILURE For the moment I found a work around to this problem by deactivating deploy to repository post-task and specifying deploy instead of install in the maven goal configuration input

          I also have a post-build deploy issue, with the same output as above.
          This works fine in my labo environment (Windows Seven), but it fails on our integration server (Linux RedHat 5.7), both with Jenkins 1.442 and the same Nexus repository instance.
          mvn deploy works fine either on command line and from Jenkins and is actually my workaround.

          Giorgio Anastopoulos added a comment - I also have a post-build deploy issue, with the same output as above. This works fine in my labo environment (Windows Seven), but it fails on our integration server (Linux RedHat 5.7), both with Jenkins 1.442 and the same Nexus repository instance. mvn deploy works fine either on command line and from Jenkins and is actually my workaround.

          Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli)
          on project standalone-pom: Failed to deploy artifacts: Could not transfer artifact abc.zip.
          Return code is: 401

          I am getting this issue on Jenkins 1.450. while deploying artifact using a bat file.
          which is running from a pom.xml target using Jenkins.
          This works fine when I launch bat file, while fails when it launch through Jenkins.
          Please have a look on the issue.

          manvendra tomar added a comment - Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts: Could not transfer artifact abc.zip. Return code is: 401 I am getting this issue on Jenkins 1.450. while deploying artifact using a bat file. which is running from a pom.xml target using Jenkins. This works fine when I launch bat file, while fails when it launch through Jenkins. Please have a look on the issue.

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/jenkins/31b0ebee0303432683a7f805c901a6ecaa7ab26d
          Log:
          JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml
          @see hudson.maven.MavenUtil#createEmbedder

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/jenkins/31b0ebee0303432683a7f805c901a6ecaa7ab26d Log: JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml @see hudson.maven.MavenUtil#createEmbedder

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/jenkins/51d5220f6c19c4e7d5c35a07b62219472b2a7870
          Log:
          JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml
          @see hudson.maven.MavenUtil#createEmbedder

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/jenkins/51d5220f6c19c4e7d5c35a07b62219472b2a7870 Log: JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml @see hudson.maven.MavenUtil#createEmbedder

          dogfood added a comment -

          Integrated in jenkins_main_trunk #1912
          JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml (Revision 31b0ebee0303432683a7f805c901a6ecaa7ab26d)

          Result = UNSTABLE
          Nicolas De Loof : 31b0ebee0303432683a7f805c901a6ecaa7ab26d
          Files :

          • maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java

          dogfood added a comment - Integrated in jenkins_main_trunk #1912 JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml (Revision 31b0ebee0303432683a7f805c901a6ecaa7ab26d) Result = UNSTABLE Nicolas De Loof : 31b0ebee0303432683a7f805c901a6ecaa7ab26d Files : maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java

          dogfood added a comment -

          Integrated in jenkins_main_trunk #1913
          JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml (Revision 51d5220f6c19c4e7d5c35a07b62219472b2a7870)

          Result = UNSTABLE
          Nicolas De Loof : 51d5220f6c19c4e7d5c35a07b62219472b2a7870
          Files :

          • maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java

          dogfood added a comment - Integrated in jenkins_main_trunk #1913 JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml (Revision 51d5220f6c19c4e7d5c35a07b62219472b2a7870) Result = UNSTABLE Nicolas De Loof : 51d5220f6c19c4e7d5c35a07b62219472b2a7870 Files : maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/maven-plugin/dd2fafb45e1d23c347674a7bdcd2f222b5a10113
          Log:
          [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task
          logic to get remote settings.xml file, test in this order (as maven do)
          1. configured alternateSettings
          2. ~/.m2/settings.xml
          3. $M2_HOME/conf/settings.xml

          Originally-Committed-As: 0868af63972351c8fdf051fbc3673aa1be03e5a2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/maven-plugin/dd2fafb45e1d23c347674a7bdcd2f222b5a10113 Log: [FIXED JENKINS-9084] Regression in jenkins .401 maven plugin - deploy to repository post-task logic to get remote settings.xml file, test in this order (as maven do) 1. configured alternateSettings 2. ~/.m2/settings.xml 3. $M2_HOME/conf/settings.xml Originally-Committed-As: 0868af63972351c8fdf051fbc3673aa1be03e5a2

          Code changed in jenkins
          User: Martijn Baay
          Path:
          src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/maven-plugin/ee3d323696a97069294bf92ba4c550d42ad40af1
          Log:
          Fixed JENKINS-9084: Made sure the correct slave is detected even when it's the Master

          Originally-Committed-As: fe9347435fd326cdd3bc2b7482d4b10922f1c160

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Martijn Baay Path: src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/maven-plugin/ee3d323696a97069294bf92ba4c550d42ad40af1 Log: Fixed JENKINS-9084 : Made sure the correct slave is detected even when it's the Master Originally-Committed-As: fe9347435fd326cdd3bc2b7482d4b10922f1c160

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          src/main/java/hudson/maven/RedeployPublisher.java
          http://jenkins-ci.org/commit/maven-plugin/d7527cbf0fd33c06e8ba206eef1de00ccaa1a2b7
          Log:
          JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml
          @see hudson.maven.MavenUtil#createEmbedder
          Originally-Committed-As: 51d5220f6c19c4e7d5c35a07b62219472b2a7870

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/maven/RedeployPublisher.java http://jenkins-ci.org/commit/maven-plugin/d7527cbf0fd33c06e8ba206eef1de00ccaa1a2b7 Log: JENKINS-9084 setting maven home is enough for global settings to be m.getHome()/conf/settings.xml @see hudson.maven.MavenUtil#createEmbedder Originally-Committed-As: 51d5220f6c19c4e7d5c35a07b62219472b2a7870

            olamy Olivier Lamy
            davidkarlsen2 David Karlsen
            Votes:
            13 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: