Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference global maven settings.xml and maven settings.xml in Jenkins

Tags:

maven

jenkins

We are adding some settings.xml files in Jenkins as managed script.

What is the difference between global maven settings.xml and maven settings.xml in Jenkins? I don't know what type I have to choose in which case

like image 385
DenCowboy Avatar asked Nov 08 '17 10:11

DenCowboy


1 Answers

Taken from the user documentation on the settings dialogue of Jenkins:

The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information. There are two locations where a settings.xml file per default may live:

The Maven install - default: $M2_HOME/conf/settings.xml
A user's install - default: ${user.home}/.m2/settings.xml

The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.

So the global maven settings.xml is the one that would be of the Maven install and the maven settings.xml would be the one that is of the user's install.

like image 90
cheffe Avatar answered Oct 11 '22 19:10

cheffe