unauthorized access on artifactory even though credentials are included

Viewed 46828

I am trying to deploy a zip file to a remote inhouse maven repo.(artifactory integrated into hudson).

pom.xml

...
<modelVersion>4.0.0</modelVersion>

<groupId>mygroupId</groupId>
<artifactId>myartifactid</artifactId>   

<version>1.0-SNAPSHOT</version>

<distributionManagement>
    <repository>
      <id>hudson</id>
      <name>hudson-releases</name>
      <url>http://url to repo</url>
    </repository>
  </distributionManagement>
...

settings.xml

<servers>
<server>
  <id>hudson</id>
  <username>username</username>
  <password>password</password>
</server>
</servers> 

maven deploy

 mvn deploy:deploy-file -Durl=http://url -Dfile=file-1.0.0.zip  -Dpackaging=zip  -DpomFile=pom.xml

maven quits with return code 401.

Looking at artifactory's logs

 2011-07-15 13:52:50,090 [DENIED DEPLOY] libs-release-local:somefile.zip for anonymous/192.168.220.146.

I don't understand why maven doesn't use the supplied credentials. What am i doing wrong here ?

7 Answers

Update Maven configuration details and add the credentials of nexus:

credentials: admin
Related