Andy
Andy

Reputation: 8949

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

Upvotes: 2

Views: 546

Answers (3)

Jörn Horstmann
Jörn Horstmann

Reputation: 34044

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.

Upvotes: 3

kukudas
kukudas

Reputation: 4934

You could try to execute mvn install -U. However i'm not completly sure if this only affects SNAPSHOT versions.

Upvotes: 0

krosenvold
krosenvold

Reputation: 77231

Upgrade to maven3 and make sure all your plugins are latest versions. There are lots of intermittent/transient issues that have been fixed in both plugins and maven3. The hudson<->m3 issue might not be fixed yet, so you might have to start with the plugins.

Upvotes: 0

Related Questions