You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "cbld@netzero.net" <cb...@netzero.net> on 2010/11/01 14:12:10 UTC

accessing settings.xml when specfiying user.home

I am having trouble accessing the settings.xml when running the following command on my windows box:

   mvn -Duser.home=j:\joe_user compile

where "j:\joe_user" is a samba mounted drive to my unix box in which the .m2 directory exists.  I've run with the -X switch so I can see what's happening:

   mvn -Duser.home=j:\joe_user -X compile

   [DEBUG] Reading user settings from c:\Documents and Settings\joe_user\.m2\settings.xml
   [DEBUG] Reading global settings from j:\joe_user\maven\apache-maven-3.0\conf\settings.xml
   [DEBUG] Using local repository at j:\joe_user\.m2\repository



I've only included the interesting debug messages and you can see that I am using version 3.0 as my M2_HOME is set to j:\joe_user\maven\apache-maven-3.0

Things run as expected when I copy the settings.xml file from my unix box onto my windows box into the appropriate directory OR if i add the -s option:

   mvn -Duser.home=j:\joe_user -s j:\joe_user\.m2\settings.xml compile



My question is:  based on the maven documentation, it appears that a user's install is specified at ${user.home}/.m2/settings.xml  therefore, should specifying the user.home via -D option point to the correct location and NOT the home directory (under windows)?

I apologize if this is answered elsewhere.  I did perform several searches prior to sending this email.

thanks

bill


____________________________________________________________
DEAL OF THE YEAR: 2010 Honda Civic for $1,734.09
SPECIAL REPORT: High ticket items are being auctioned for an incredible 90% off!
http://thirdpartyoffers.netzero.net/TGL3231/4ccebcea695e153f379st04vuc

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


Re: accessing settings.xml when specfiying user.home

Posted by Vincent Latombe <vi...@gmail.com>.
Hello,

when you type mvn -Duser.home=j:\joe_user compile, you provide user.home to
maven. In your case, I think you want to provide this to the jvm that
executes maven, so you should try

set MAVEN_OPTS=-Duser.home=j:\joe_user compile

Cheers,

Vincent

2010/11/1 cbld@netzero.net <cb...@netzero.net>

> I am having trouble accessing the settings.xml when running the following
> command on my windows box:
>
>   mvn -Duser.home=j:\joe_user compile
>
> where "j:\joe_user" is a samba mounted drive to my unix box in which the
> .m2 directory exists.  I've run with the -X switch so I can see what's
> happening:
>
>   mvn -Duser.home=j:\joe_user -X compile
>
>   [DEBUG] Reading user settings from c:\Documents and
> Settings\joe_user\.m2\settings.xml
>   [DEBUG] Reading global settings from
> j:\joe_user\maven\apache-maven-3.0\conf\settings.xml
>   [DEBUG] Using local repository at j:\joe_user\.m2\repository
>
>
>
> I've only included the interesting debug messages and you can see that I am
> using version 3.0 as my M2_HOME is set to j:\joe_user\maven\apache-maven-3.0
>
> Things run as expected when I copy the settings.xml file from my unix box
> onto my windows box into the appropriate directory OR if i add the -s
> option:
>
>   mvn -Duser.home=j:\joe_user -s j:\joe_user\.m2\settings.xml compile
>
>
>
> My question is:  based on the maven documentation, it appears that a user's
> install is specified at ${user.home}/.m2/settings.xml  therefore, should
> specifying the user.home via -D option point to the correct location and NOT
> the home directory (under windows)?
>
> I apologize if this is answered elsewhere.  I did perform several searches
> prior to sending this email.
>
> thanks
>
> bill
>
>
> ____________________________________________________________
> DEAL OF THE YEAR: 2010 Honda Civic for $1,734.09
> SPECIAL REPORT: High ticket items are being auctioned for an incredible 90%
> off!
> http://thirdpartyoffers.netzero.net/TGL3231/4ccebcea695e153f379st04vuc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Vincent