keepmoving
keepmoving

Reputation: 2043

How to force Maven to read setting.xml from specific location

I am trying to set up the maven on my machine. I set the M2_HOME point to apache maven folder. There is one file called setting.xml inside my home folder followed by .m2 folder. But problem when I try to debug/compile the maven its show some different location which is not exist even my system. so I am one of user of Linux machine so I did all setting for my user account but do not have write to override any of admin setting.

so when i try to compile using mvn then its says

[DEBUG] Reading global settings from F:\TestSystems\Naveen\project\apahce-maven-3.2.3\conf\settings.xml
[DEBUG] Reading user setting from \\corp136\tsdata\testsystems10\.m2\settings.xml

see the second line this location is not exist into my machine or not related to my user account So my question can i force to maven to read settings.xml file for some specific location just like local repo.

Upvotes: 0

Views: 11095

Answers (1)

Andriy Kryvtsun
Andriy Kryvtsun

Reputation: 3354

Use -s or -gs Maven command line options for defining your settings.xml file path.

See 6.1.6. Using a Custom POM or Custom Settings File

Upvotes: 3

Related Questions