You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ben Stover <bx...@yahoo.co.uk> on 2010/12/26 14:14:36 UTC
How to setup location of settings.xml NOT by cmdline?
I want to move the location of the settings.xml away from the users home directory into another (.e.g. the Maven installation directory).
How can I achieve this for the cmdline usage (=NOT Eclipse) ?
Yes, I know I can pass an additional parameter like
mvn -s "D:\maven\settings.xml" install
but I want to omit completely any such parameters.
I prefer to have Maven auto-detect the settings.xml in its own installation directory.
Is this possible at all?
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to setup location of settings.xml NOT by cmdline?
Posted by Greg Akins <an...@gmail.com>.
On Sun, Dec 26, 2010 at 9:09 AM, Guo Du <mr...@duguo.org> wrote:
>> I prefer to have Maven auto-detect the settings.xml in its own installation directory.
> Looks like you just want put your settings inside M2_HOME/conf/settings.xml
>
Or.. mvn is a shell script (or batch file)
You could just modify that script
--
Greg Akins
http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to setup location of settings.xml NOT by cmdline?
Posted by benxs <bx...@yahoo.co.uk>.
Thank you.
One more last question:
Assume I use such an external Maven installation from Eclipse (= not the
internal, embedded Maven from Eclipse).
Does Eclipse pay attention to the preferences (e.g. the location of the
Repository) in these settings.xmls
as well?
--
View this message in context: http://maven.40175.n5.nabble.com/How-to-setup-location-of-settings-xml-NOT-by-cmdline-tp3318651p3319127.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to setup location of settings.xml NOT by cmdline?
Posted by Benson Margulies <bi...@gmail.com>.
M2_HOME/conf/settings.xml is the GLOBAL settings. They are always
read, first. The the user's settings come in on top.
On Sun, Dec 26, 2010 at 11:44 AM, benxs <bx...@yahoo.co.uk> wrote:
>
>> Looks like you just want put your settings inside M2_HOME/conf/settings.xml
>
> Thank you. That sounds interesting!
>
> Does that mean that Maven reads automatically every time it starts
> the file
>
> M2_HOME/conf/settings.xml
>
> before the file
>
> <userhome>/.m2/settings.xml
>
> ? Does Maven read both or only the first file it finds?
> Which one has priority?
>
> Where is this fact written?
> I have not seen this.
>
> Thank you
> Ben
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/How-to-setup-location-of-settings-xml-NOT-by-cmdline-tp3318651p3318753.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to setup location of settings.xml NOT by cmdline?
Posted by Guo Du <mr...@duguo.org>.
On Sun, Dec 26, 2010 at 4:44 PM, benxs <bx...@yahoo.co.uk> wrote:
> ? Does Maven read both or only the first file it finds?
> Which one has priority?
Based on org.apache.maven.settings.building.DefaultSettingsBuilder
implementation, maven read both and merge them on runtime.
<userhome>/.m2/settings.xml taken priority.
> Where is this fact written?
Saw a discussion [1] but it would be helpful to documented at [2]
-Guo
[1] http://stackoverflow.com/questions/1261215/which-maven-settings-xml-files
[2] http://maven.apache.org/settings.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to setup location of settings.xml NOT by cmdline?
Posted by benxs <bx...@yahoo.co.uk>.
> Looks like you just want put your settings inside M2_HOME/conf/settings.xml
Thank you. That sounds interesting!
Does that mean that Maven reads automatically every time it starts
the file
M2_HOME/conf/settings.xml
before the file
<userhome>/.m2/settings.xml
? Does Maven read both or only the first file it finds?
Which one has priority?
Where is this fact written?
I have not seen this.
Thank you
Ben
--
View this message in context: http://maven.40175.n5.nabble.com/How-to-setup-location-of-settings-xml-NOT-by-cmdline-tp3318651p3318753.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to setup location of settings.xml NOT by cmdline?
Posted by Guo Du <mr...@duguo.org>.
> I prefer to have Maven auto-detect the settings.xml in its own installation directory.
Looks like you just want put your settings inside M2_HOME/conf/settings.xml
Happy holiday!
-Guo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org