Solved

Maven: settings.xml in defined path

Posted on 2010-08-30
1
640 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

707 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