You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Villemos, Gert" <ge...@logica.com> on 2009/11/04 15:17:22 UTC

Maven fails to deploy to artifactory - Code 401

We are building a Maven2 multi-module project using Hudson v1.323. When
using the 'deploy' goal, the build fails with the exception;


[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file:
http://10.48.29.168:8888/artifactory-2.0.5/internal-repository/esa/dops/
game/game/1/game-1.pom. Return code is: 401 
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying
artifact: Failed to transfer file:
http://10.48.29.168:8888/artifactory-2.0.5/internal-repository/esa/dops/
game/game/1/game-1.pom. Return code is: 401
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:703)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:540)
	...


It seems Hudson / maven2 are not authorized to deploy artefacts to the
repository. We have updated the local Hudson .m2/settings.xml file to
contain;

<servers>
	<server>
		<id>internal-repository</id>
		<username>[username]</username>
		<password>[password]</password>
	</server>
</servers>


<repositories>
	<repository>
		<id>internal-repository</id>
	
<url>http://[IP]/artifactory-2.0.5/internal-repository/</url>
	</repository>
</repositories>


URL and user / password are correct. What are we doing wrong?

Thanks,
Gert.

Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch�tzen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



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


Re: Maven fails to deploy to artifactory - Code 401

Posted by Yossi Shaul <yo...@yahoo.com>.
The server id in the settings.xml has to match the server id of the target repository in the distributionManagement section (not the id of the repository under the repositories tag). 
For example: 
<distributionManagement>
     <repository>
               <id>internal-repository</id>
               http://[IP]/artifactory-2.0.5/internal-repository/
       </repository>
</distributionManagement>


Yossi Shaul

From: Villemos, Gert <ge...@logica.com>
Date: Wed, Nov 4, 2009 at 4:17 PM
Subject: Maven fails to deploy to artifactory - Code 401
To: Maven Users List <us...@maven.apache.org>


We are building a Maven2 multi-module project using Hudson v1.323. When
using the 'deploy' goal, the build fails with the exception;


[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file:
http://10.48.29.168:8888/artifactory-2.0.5/internal-repository/esa/dops/
game/game/1/game-1.pom. Return code is: 401
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying
artifact: Failed to transfer file:
http://10.48.29.168:8888/artifactory-2.0.5/internal-repository/esa/dops/
game/game/1/game-1.pom. Return code is: 401
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:703)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:540)
       ...


It seems Hudson / maven2 are not authorized to deploy artefacts to the
repository. We have updated the local Hudson .m2/settings.xml file to
contain;

<servers>
       <server>
               <id>internal-repository</id>
               <username>[username]</username>
               <password>[password]</password>
       </server>
</servers>


<repositories>
       <repository>
               <id>internal-repository</id>

http://[IP]/artifactory-2.0.5/internal-repository/
       </repository>
</repositories>


URL and user / password are correct. What are we doing wrong?

Thanks,
Gert.

Please help Logica to respect the environment by not printing this
email  / Pour contribuer comme Logica au respect de l'environnement,
merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht
nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /
Por favor ajude a Logica a respeitar o ambiente nao imprimindo este
correio electronico.



This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be
copied, disclosed to, retained or used by, any other party. If you are
not an intended recipient then please promptly delete this e-mail and
any attachment and all copies and inform the sender. Thank you.



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




-- 
Yoav Landman
Artifactory Founder
Co-founder and Products Development Lead
JFrog Ltd.
http://www.jfrog.org/