Artifactory 2.2.1 and Hudson - error
I have just recently updated my Artifactory from version 2.0.7 to version 2.2.1 and immediately my release builds done from Hudson using the Hudson Release Plugin started failing with a nasty error message (line breaks added manually for readability).
ERROR: Error deploying artifact: Resource to deploy not found: File: http:/*/artifactory/libs-releases-local/*/0.1.24-SNAPSHOT/ console-0.1.24-SNAPSHOT.pom does not exist org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Resource to deploy not found: File: http://*/artifactory/libs-releases-local/*/0.1.24-SNAPSHOT/console-0.1.24-SNAPSHOT.pom does not exist at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:94) at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:119) at hudson.maven.reporters.MavenAggregatedArtifactRecord.deploy(MavenAggregatedArtifactRecord.java:79) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:96) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563) at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1221) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: org.apache.maven.wagon.TransferFailedException: Resource to deploy not found: File: http://*/artifactory/libs-releases-local/*/0.1.24-SNAPSHOT/console-0.1.24-SNAPSHOT.pom does not exist at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:283) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:160) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80) ... 12 more Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: File: http://*/artifactory/libs-releases-local/*/0.1.24-SNAPSHOT/console-0.1.24-SNAPSHOT.pom does not exist at org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:168) at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:244) ... 14 more
It normally helps to see the Artifactory system log. Here is what I found in mine:
2010-02-18 13:48:10,732 [http-8000-3] [WARN ] (o.a.r.j.StoringRepoMixin:543) - IO error while trying to save resource libs-releases-local: */0.1.15-SNAPSHOT/console-0.1.15-SNAPSHOT.pom'': The target deployment path '*/0.1.15-SNAPSHOT/console-0.1.15-SNAPSHOT.pom' does not match the POM's expected path prefix '*/0.1.16-SNAPSHOT'. Please verify your POM content for correctness and make sure the source path is a valid Maven 2 repository root path.
But that's easy to fix with the following command:
-Dartifactory.maven.suppressPomConsistencyChecks=true
You should pass it to your server that runs Artifactory.
However, I also found this:
2010-02-18 13:48:10,732 [http-8000-3] [ERROR] (o.a.j.l.SessionLockEntry:266) - Immutable item /repositories/libs-releases-local*/0.1.15-SNAPSHOT/console-0.1.15-SNAPSHOT.pom has local modifications that will be ignored.
I found this call in the Artifactory source code but that didn't really give me any clues...
Anyway, the release builds were still failing and luckily I managed to find a workaround.
The workaround
The workaround is a simple operation to be done in Hudson actually (not in Artifactory). In your project configuration there might be two check boxes:
- Deploy artifacts to Maven repository
- Deploy artifacts to Artifactory
The workaround for this issue is: uncheck both check boxes. Easy does it.

2 comments: