Solved

Maven: settings.xml in defined path

Posted on 2010-08-30
1
629 Views
Last Modified: 2013-11-10
Hi: With Maven, settings.xml would be in ./m2, how could I put settings.xml to somewhere I want.  If I have different projects running in my machine, I do not want same settings.xml serving for every project.  
0
Comment
Question by:JianJunShen
1 Comment
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 33556404
There are two places where settings.xml is looked for

 $M2_HOME/conf/settings.xml
 ${user.home}/.m2/settings.xml

You can use the --settings and --global-settings to change where it looks

mvn install --settings \somwhere\settings.xml --global-settings /somewhere/else/settings.xml
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Java 1603 Error 2 42
where is session ID cache stored 1 39
word0 challenge 4 53
Core Java. What output will be and why ? 6 58
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now