Search code examples
javamaven-2hudson

Hudson fails Maven2 build sporadically - missing webdav


Every few weeks my Hudson build fails and I get this error output. When I delete my entire .m2\repository\org\apache\maven\wagon\wagon-webdav directory and kick off another build without that dependency in the repo, it resolves the problem for a few weeks.

I never see this error outside of Hudson. I'm on Maven 2.2.1 and Hudson 1.378.

[INFO] Scanning for projects...
[INFO] artifact org.apache.maven.wagon:wagon-webdav: checking for updates from relrepo
[INFO] artifact org.apache.maven.wagon:wagon-webdav: checking for updates from central
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) org.apache.maven.wagon:wagon-webdav:jar:RELEASE

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-webdav -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-webdav -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) com.my-company-project:1.0-SNAPSHOT
    2) org.apache.maven.wagon:wagon-webdav:jar:RELEASE

Solution

  • Are you depending on an artifact version of RELEASE? I don't think this is recommended any more and it is one of the few features that is actually not supported in maven 3. Can you try depending on a specific version number? That would also make your build more easily reproducible.