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/10/25 14:47:00 UTC

How to move $USERHOME\.m2 folder to another directory?

Currently my Maven settings dir is

C:\Documents and Settings\ben\.m2\
resp.
C:\Documents and Settings\ben\.m2\repository

How can I move this directory to another location e.g.

D:\maven

Which parameters in which file do I have to change (even in Eclipse maven plugin) to have Maven 
working with the new config+repository folder?

Ben



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


Re: deploy:deploy-file plugin

Posted by Gerard Weatherby <ge...@alum.mit.edu>.
Yes, absolutely works like a charm. ..and it was in the documentation. 
Just couldn't find it (tree, forest).
Thanks.

On 10/25/10 3:28 PM, Anders Hammar wrote:
> Make sure to have the repositoryId param specified:
> http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html#repositoryId
> Define the credentials matching this id in your settings.xml.
>
> /Anders
>
> On Mon, Oct 25, 2010 at 15:04, Gerard Weatherby<ge...@alum.mit.edu>wrote:
>
>> I'm trying to use the Maven deploy plugin to upload an additional file to
>> our online public repository.
>>
>> When I specify
>> <url>sftp://gerardw,connjur@frs.sourceforge.net:
>> /home/groups/c/co/connjur/htdocs/m2_repo</url>
>>
>> in the distributionManagement section of my pm, maven reads the necessary
>> authentication info from settings.xml and everything works great.
>>
>> When I attempt the same specification in the maven-deploy-plugin
>> configuration, it appears to ignore the user name and tries to login into
>> frs.sourceforge.net using my local username.
>>
>> Is their a way to specify a user name to the maven deploy plugin?
>>
>>
>> ---------------------------------------------------------------------
>> 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: deploy:deploy-file plugin

Posted by Anders Hammar <an...@hammar.net>.
Make sure to have the repositoryId param specified:
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html#repositoryId
Define the credentials matching this id in your settings.xml.

/Anders

On Mon, Oct 25, 2010 at 15:04, Gerard Weatherby <ge...@alum.mit.edu>wrote:

> I'm trying to use the Maven deploy plugin to upload an additional file to
> our online public repository.
>
> When I specify
> <url>sftp://gerardw,connjur@frs.sourceforge.net:
> /home/groups/c/co/connjur/htdocs/m2_repo</url>
>
> in the distributionManagement section of my pm, maven reads the necessary
> authentication info from settings.xml and everything works great.
>
> When I attempt the same specification in the maven-deploy-plugin
> configuration, it appears to ignore the user name and tries to login into
> frs.sourceforge.net using my local username.
>
> Is their a way to specify a user name to the maven deploy plugin?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

deploy:deploy-file plugin

Posted by Gerard Weatherby <ge...@alum.mit.edu>.
I'm trying to use the Maven deploy plugin to upload an additional file 
to our online public repository.

When I specify
<url>sftp://gerardw,connjur@frs.sourceforge.net:/home/groups/c/co/connjur/htdocs/m2_repo</url>

in the distributionManagement section of my pm, maven reads the 
necessary authentication info from settings.xml and everything works great.

When I attempt the same specification in the maven-deploy-plugin 
configuration, it appears to ignore the user name and tries to login into
frs.sourceforge.net using my local username.

Is their a way to specify a user name to the maven deploy plugin?


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


Re: How to move $USERHOME\.m2 folder to another directory?

Posted by Alexis Morelle <Al...@alcatel-lucent.com>.
  Hi,

if that's just for the local repository you can do that otherwise if you 
want to move the location of the settings file also, you can specify one 
using "-s" option in maven. In eclipse you can set the location of the 
settings.xml file in the maven preferences.

Be careful, if you forget the option, the settings file inside the .m2 
directory of your home directory will be used. If it's not there, only 
the global settings file (in the maven installation directory) will be 
considered.

Using mvn --help you get:
-gs,--global-settings <arg>
Alternate path for the global settings file
  -s,--settings <arg>
Alternate path for the user settings file

Alexis.

Le 25/10/2010 14:51, hermod.opstvedt@dnbnor.no a écrit :
> Hei
>
> In $USERHOME\.m2 settings.xml file you can specify the location of the
> repository
>
> <?xml version="1.0" encoding="UTF-8"?>
> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
> http://maven.apache.org/xsd/settings-1.0.0.xsd">
>
> 	<localRepository>point to your new location</localRepository>
> .....
>
> Hermod
>
> -----Original Message-----
> From: Ben Stover [mailto:bxstover@yahoo.co.uk]
> Sent: Monday, October 25, 2010 2:47 PM
> To: users@maven.apache.org
> Subject: How to move $USERHOME\.m2 folder to another directory?
>
> Currently my Maven settings dir is
>
> C:\Documents and Settings\ben\.m2\
> resp.
> C:\Documents and Settings\ben\.m2\repository
>
> How can I move this directory to another location e.g.
>
> D:\maven
>
> Which parameters in which file do I have to change (even in Eclipse
> maven plugin) to have Maven working with the new config+repository
> folder?
>
> Ben
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that the DnB NOR Group
> cannot accept any payment orders or other legally binding correspondence with
> customers as a part of an email.
>
> This email message has been virus checked by the anti virus programs used
> in the DnB NOR Group.
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
>
> ---------------------------------------------------------------------
> 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 move $USERHOME\.m2 folder to another directory?

Posted by he...@dnbnor.no.
Hei

In $USERHOME\.m2 settings.xml file you can specify the location of the
repository

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

	<localRepository>point to your new location</localRepository> 
.....

Hermod 

-----Original Message-----
From: Ben Stover [mailto:bxstover@yahoo.co.uk] 
Sent: Monday, October 25, 2010 2:47 PM
To: users@maven.apache.org
Subject: How to move $USERHOME\.m2 folder to another directory?

Currently my Maven settings dir is

C:\Documents and Settings\ben\.m2\
resp.
C:\Documents and Settings\ben\.m2\repository

How can I move this directory to another location e.g.

D:\maven

Which parameters in which file do I have to change (even in Eclipse
maven plugin) to have Maven working with the new config+repository
folder?

Ben



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

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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