aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Settings XML file changes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Settings XML file changes" Watch "Settings XML file changes" New topic
Author

Settings XML file changes

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9384
    
    2

Guys,

Am I allowed to change the settings.xml file located under the conf directory of my Maven installation or do I have to create one under .m2 and override the defaults?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

You can change the one on the Maven conf directory - it will apply to everyone using that PC who does not have an .m2/settings.xml file.

I used to change m2_home/conf/settings.xml, but have recently switched to using .m2/settings.xml for two reasons. First, when I upgrade to a newer version of Maven I get to keep my settings automatically (saves having to copy the file). But second, and most importantly, I typically use the exact same Maven install for both Linux and Windows and by having two .m2/settings.xml files I can set the local repository directory to the correct settings (d:/opt/m2_repo in Windows, /opt/m2_repo in Linux). (I even share the m2_repo directory between Windows and Linux so both directories are actually the same location.)


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Settings XML file changes