Edd Grant (EdD) :: Code, Compose, Bike, Brew etc ... though not necessarily in that order
 

Feb 26, 2009

 

I recently started using Hudson as a Windows service, upon doing this I noticed that it completely ignores my Maven configuration file %HOMEPATH%\.m2\settings.xml. I couldn't initially figure out why this was happening until I remembered that Windows services run by default as the system account, not as a user account.  The system account doesn't have any concept of the same %HOMEPATH% environment variable which is used when I use Maven interactively which is why my settings.xml was being ignored under Hudson .

To overcome this problem make sure you use the settings.xml file under belonging to the actual Maven installation which Hudson uses to build your project, in my case this was:

 C:\Program_Files\Programming\Java\apache-maven-2.0.10\conf\settings.xml

A quick update to this file, adding in the settings I usually use (basically a Nexus mirror) sorted this right out.

Note: This should be obvious but by modifying the settings.xml belonging to the Maven installation you are essentially changing the system wide Maven defaults which will affect all users unless they have specified otherwise in their own settings.xml file.

EdD


Posted at 05:07AM Feb 26, 2009 by EdD in Java
Comments[0]
Link to this post: Add this to delicious etc.
Trackback URL for this entry
Comments:

Post a Comment:
  • HTML Syntax: Allowed