DISABLE ADBLOCK

ADBlock is blocking some content on the site

ADBlock errore

Hudson can't build my Maven 2 project because it says artifacts are missing from the repository? (they aren't)

StackOverflow https://stackoverflow.com/questions/44144
 Checked

Question

I'm using Hudson and Maven 2 for my automated build/CI. I can build fine with maven from the command line, but when I run the same goal with Hudson, the build fails complaining of missing artifacts. I'm running Hudson as a windows XP service.

Solution

Obvious question, but have you got Hudson set up to point to the same Maven repository as your command line build? You can check this from the Hudson admin gui - look in the Maven section of the Manage Hudson page. This should have a MAVEN_HOME environment variable listed. Look in the settings.xml file under:

MAVEN_HOME\conf\settings.xml

The localRepository configuration item is the location of the Maven repository that the Hudson build is using.

OTHER TIPS

Make sure you're running Hudson as the same user that you are using to run Maven from the command line. Maven creates a separate repository for each user. If you are running Hudson as a Windows service, this won't be the same user as you have logged on as and will be running "mvn" commands with. This means the artifacts in the repositories may be different.

To fix, either start Hudson manually as the user which works, or update the repository for the user which Hudson is running as.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow