-
Bug
-
Resolution: Fixed
-
Major
-
None
Since few weeks my builds aren't deploying artifacts from Maven but from the jenkins post build tasks to fail faster if there is a build issue and to not publish an unless incomplete set of artifacts SNAPSHOTs in the remote repositories.
But since I use this I noticed various upload failures like this one :
Maven RedeployPublished use remote maven settings from : /home/swfhudson/.m2/settings.xml [INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true) Deploying the main artifact cs-2.1.6-SNAPSHOT.pom [INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true) Deploying the main artifact cs.packaging.module-2.1.6-SNAPSHOT.pom Deploying the main artifact cs.packaging.module-2.1.6-SNAPSHOT.js [INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true) Deploying the main artifact cs.packaging.product-2.1.6-SNAPSHOT.pom Deploying the main artifact cs.packaging.product-2.1.6-SNAPSHOT.js [INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true) Deploying the main artifact exo.cs.datamigration-2.1.6-SNAPSHOT.jar Deploying the main artifact exo.cs.datamigration-2.1.6-SNAPSHOT-sources.jar [INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true) Deploying the main artifact exo.cs.datamigration-import-2.1.6-SNAPSHOT.jar Deploying the main artifact exo.cs.datamigration-import-2.1.6-SNAPSHOT-sources.jar [INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true) Deploying the main artifact exo.cs.demo-2.1.6-SNAPSHOT.pom [INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true) Deploying the main artifact exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war ERROR: Failed to deploy artifacts: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141) at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:148) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:146) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:664) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:639) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:895) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:586) at hudson.model.Run.run(Run.java:1400) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:465) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:146) Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284) at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137) ... 11 more Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466) at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278) ... 14 more Caused by: org.apache.maven.wagon.TransferFailedException: PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:343) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465) ... 15 more Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated. at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487) at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2110) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1088) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at org.apache.maven.wagon.providers.webdav.CorrectedWebdavResource.putMethod(CorrectedWebdavResource.java:157) at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:290) ... 17 more [INFO] Deployment failed after 9 min 4 sec
Searching a little bit we can find this issue (http://jira.codehaus.org/browse/WAGON-108) where it is said that it could be related to the version of the wagon used and the httpcommons-client.
Digging in my server apache logs I can see that all uploads from jenkins are marked as :
127.0.0.1 - - [21/Jun/2011:20:30:37 +0200] "PUT /content/repositories/exo-snapshots/org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war HTTP/1.1" 400 386 "-" "Jakarta Commons-HttpClient/3.1-rc1"
It is using "Jakarta Commons-HttpClient/3.1-rc1" while my maven builds are using the wagon org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-7 which has a dependency to commons-httpclient:commons-httpclient:3.1
I never had this upload error when I deployed from Maven itself thus there is either a classloader issue or something badly implemented which doesn't use the wagon defined in the project pom.
- depends on
-
JENKINS-9805 [Maven Jobs] Post build deploy task : Fork the JVM to allow to deploy with the same MAVEN_OPTS settings like in the build
- Open