Reputation:
I just want to change the .m2 path of a jenkins project in maven. Everytime when I build the project the .m2 folder is in c:\ and empty! There's no settings.xml or something...
The .m2 path of eclipse is in user.home (that's okay).
But how can I change the path of the .m2 folder in jenkins?
Thank you guys ;-)
Upvotes: 1
Views: 3500
Reputation: 2430
In the project configuration
page of Jenkin, under the tab Build
, select Invoke Maven
and click on Advanced
. There is a check box Use private Maven repository
. If this is selected, Jenkins will tell Maven to use $WORKSPACE/.repository as the local Maven repository.
Click on the help topic in Jenkin itself. It will give a clear idea.
If you need to invoke maven out side this plugin, you can pass
-Dmaven.repo.local=/some/path/.maven/repo
Upvotes: 3