Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven command to determine which settings.xml file Maven is using

How do I use maven command line to determine which settings.xml file Maven is picking up?

like image 964
harschware Avatar asked Aug 11 '09 15:08

harschware


People also ask

How do you check which settings xml Maven is using?

mvn help:effective-settings shows the effective settings of the current environment including your location of settings. xml file. Additionally showPasswords=true will help you see the passwords resolved as well if you are using environment variables.

How do you check which settings xml Maven is using in eclipse?

Open your Eclipse and go to Window -> Preferences. Click on the Browse button of User Settings , and select the settings. xml.

What is Mvn settings xml?

A Maven settings. xml file defines values that configure Maven execution in various ways. Most commonly, it is used to define a local repository location, alternate remote repository servers, and authentication information for private repositories.


1 Answers

Start maven with -X option (debug) and examine the beginning of the output. There should be something like this:

... [INFO] Error stacktraces are turned on. [DEBUG] Reading global settings from c:\....\apache-maven-3.0.3\conf\settings.xml [DEBUG] Reading user settings from c:\....\.m2\settings.xml [DEBUG] Using local repository at C:\....\repository ... 

(Original directory names are removed by me)

like image 188
elek Avatar answered Sep 16 '22 11:09

elek