You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jonjack <jo...@gmail.com> on 2010/11/19 18:11:18 UTC

m2.conf and local repo custom location

Hi,


2 questions please regarding the local repository:


1.)
Ive installed Maven 3.0 on my local machine and for various reasons need a
different local repo location from the default path specified in -
${user.home}/m2

So, I updated settings.xml as follows:
--------------------------------------

<localRepository>C:\development\.m2\repository</localRepository>


After building an archetype the custom location was used fine.
However, I am unlcear as to how and when m2.conf is used when running Maven.

Should I update m2.conf accordingly:
-------------------------------------

from:
set maven.home default ${user.home}/m2

to:
set maven.home default C:/development/.m2



2.)
The local repo gets installed to [some path]/.m2

Why does the entry in m2.conf not specify the  fullstop (.) before the m2?

shouldnt it be set maven.home default ${user.home}/.m2




-- 
View this message in context: http://maven.40175.n5.nabble.com/m2-conf-and-local-repo-custom-location-tp3272652p3272652.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: m2.conf and local repo custom location

Posted by jonjack <jo...@gmail.com>.
Does anyone know what m2.conf is actually designed for?


Thanks
-- 
View this message in context: http://maven.40175.n5.nabble.com/m2-conf-and-local-repo-custom-location-tp3272652p3273122.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: m2.conf and local repo custom location

Posted by Benjamin Bentmann <be...@udo.edu>.
jonjack wrote:

> Also, what about the dot (.) missing from the default path to .m2 in
> m2.conf?

That line has no effect as maven.home is set by the launch scripts, so 
its contents doesn't matter.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: m2.conf and local repo custom location

Posted by jonjack <jo...@gmail.com>.
Thanks for the reply Benjamin. So, to interpret what your saying - as long as
you specify an explicit location the default is never referrred to?

Just trying to understand why we have repo location configuration in both
settings.xml and m2.conf?


Also, what about the dot (.) missing from the default path to .m2 in
m2.conf?

would really appreciate the extra info.


regards
Jon
-- 
View this message in context: http://maven.40175.n5.nabble.com/m2-conf-and-local-repo-custom-location-tp3272652p3272694.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: m2.conf and local repo custom location

Posted by Benjamin Bentmann <be...@udo.edu>.
jonjack wrote:

> Should I update m2.conf accordingly:
> -------------------------------------
>
> from:
> set maven.home default ${user.home}/m2

You could also remove that line which has the same effect, it doesn't 
matter.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org