You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by shiraz memon <sh...@yahoo.com> on 2009/10/28 10:30:34 UTC

Maven deploy ignores settings.xml

Hi,

I am trying to deploy an artifact on a remote repository using mvn
deploy:deploy-file. The command I am trying to execute is 

mvn deploy:deploy-file -Dfile=target/abc-1.2.0.jar
-Durl=scp://remoteMachine/srv/www/htdocs/maven -DgroupId=com.example
-DartifactId=abc -Dversion=1.2.0 -Dpackaging=jar -DpomFile=pom.xml -gs
/home/localUser/apache-maven.-2.2.1/conf/settings.xml

While in settings.xml I have 

<server>
      <id>repo-id</id>
      <username>remoteUser</username>
      <password>myPwd</password>
 </server>

But whenever I execute it, it always prompts for the password with the local
username instead of the username defined in the settings.xml file. such as, 

localUser@remoteMachine.de

but I was expecting

remoteUser@remoteMachine.de

Thanks for any help in advance.
Shiraz
-- 
View this message in context: http://www.nabble.com/Maven-deploy-ignores-settings.xml-tp26091684p26091684.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: Maven deploy ignores settings.xml

Posted by Anders Hammar <an...@hammar.net>.
You need to set the repositoryId to "repo-id" on command line as well:
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html#repositoryId

If not, Maven has no way of knowing how to map the defined repo url to the
credentials in settings.xml.

/Anders

On Wed, Oct 28, 2009 at 10:30, shiraz memon <sh...@yahoo.com> wrote:

>
> Hi,
>
> I am trying to deploy an artifact on a remote repository using mvn
> deploy:deploy-file. The command I am trying to execute is
>
> mvn deploy:deploy-file -Dfile=target/abc-1.2.0.jar
> -Durl=scp://remoteMachine/srv/www/htdocs/maven -DgroupId=com.example
> -DartifactId=abc -Dversion=1.2.0 -Dpackaging=jar -DpomFile=pom.xml -gs
> /home/localUser/apache-maven.-2.2.1/conf/settings.xml
>
> While in settings.xml I have
>
> <server>
>      <id>repo-id</id>
>      <username>remoteUser</username>
>      <password>myPwd</password>
>  </server>
>
> But whenever I execute it, it always prompts for the password with the
> local
> username instead of the username defined in the settings.xml file. such as,
>
> localUser@remoteMachine.de
>
> but I was expecting
>
> remoteUser@remoteMachine.de
>
> Thanks for any help in advance.
> Shiraz
> --
> View this message in context:
> http://www.nabble.com/Maven-deploy-ignores-settings.xml-tp26091684p26091684.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
>
>