Hi,

I recently set up Artifactory 2.6.1 in a Tomcat 7 container to do some proof
of concept work.  I configured Artifactory to use LDAP authentication and
set myself up as an admin and deployer to a release repository I created.  I
am now trying to deploy 3rd party artifacts to this repository following the
instructions here regarding the deploy:deploy-file mojo:
http://maven.apache.org/plugins/maven-deploy-plugin/usage.html

When I attempt to deploy using this, I can clearly see in the logs that the
server sees it's me but I get a 403.  If instead I construct a pom.xml and
use mvn deploy without the deploy-file mojo, this works.  This seems like a
bug to me.  Here's the relevant details about this:

What fails:
===============================================================================
The command I used:  mvn -U deploy:deploy-file
-Durl=http://wmg-rc-dev:8980/artifactory/wrttsvn -DrepositoryId=wrttmvn
-Dfile=javancss.jar -DgroupId=kclee -DartifactId=javancss.javancss
-Dversion=29.50 -DgeneratePom=true -Dpackaging=jar

The output I get from this: 
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building javancss.javancss 29.50
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @
javancss.javancss ---
Uploading:
http://wmg-rc-dev:8980/artifactory/wrttsvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar
Uploading:
http://wmg-rc-dev:8980/artifactory/wrttsvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.pom
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7.687s
[INFO] Finished at: Fri Jun 08 08:40:21 PDT 2012
[INFO] Final Memory: 3M/15M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli)
on project javancss.javancss: Failed to deploy artifac
ts: Could not transfer artifact kclee:javancss.javancss:jar:29.50 from/to
wrttmvn (http://wmg-rc-dev:8980/artifactory/wrttsvn): Access denied to:
http://wmg-rc-
dev:8980/artifactory/wrttsvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar,
ReasonPhrase:Forbidden. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


The request.log entries:
20120608094018|78|REQUEST|172.31.36.47|jmdahli|PUT|/wrttsvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar|HTTP/1.1|403|127683
20120608094021|2|REQUEST|172.31.36.47|jmdahli|PUT|/wrttsvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.pom|HTTP/1.1|403|395




What works:
===============================================================================
The command I use: mvn -U deploy -DgeneratePom=true -Dpackaging=jar

The pom.xml I use:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";
xmlns="http://maven.apache.org/POM/4.0.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>kclee</groupId>
  <artifactId>javancss.javancss</artifactId>
  <version>29.50</version>
  <distributionManagement>
      <repository>
          <id>wrttmvn</id>
          <name>wrttmvn-releases</name>
          <url>http://wmg-rc-dev:8980/artifactory/wrttmvn</url>
      </repository>
  </distributionManagement>
</project>

The results:
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @
javancss.javancss ---
Uploading:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar
Uploaded:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar
(2 KB at 0.6 KB/sec)
Uploading:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.pom
Uploaded:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.pom
(633 B at 0.2 KB/sec)
Downloading:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/maven-metadata.xml
Downloaded:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/maven-metadata.xml
(356 B at 0.3 KB/sec)
Uploading:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/maven-metadata.xml
Uploaded:
http://wmg-rc-dev:8980/artifactory/wrttmvn/kclee/javancss.javancss/maven-metadata.xml
(329 B at 0.2 KB/sec)
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 13.781s
[INFO] Finished at: Fri Jun 08 08:43:18 PDT 2012
[INFO] Final Memory: 5M/15M
[INFO]
------------------------------------------------------------------------

The request.log entries:
20120608094311|218|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar|HTTP/1.1|201|1488
20120608094311|21|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar.sha1|HTTP/1.1|201|40
20120608094312|24|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.jar.md5|HTTP/1.1|201|32
20120608094313|69|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.pom|HTTP/1.1|201|633
20120608094314|23|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.pom.sha1|HTTP/1.1|201|40
20120608094315|27|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/29.50/javancss.javancss-29.50.pom.md5|HTTP/1.1|201|32
20120608094315|6|REQUEST|172.31.36.47|jmdahli|GET|/wrttmvn/kclee/javancss.javancss/maven-metadata.xml|HTTP/1.1|200|356
20120608094316|4|REQUEST|172.31.36.47|jmdahli|GET|/wrttmvn/kclee/javancss.javancss/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120608094316|39|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/maven-metadata.xml|HTTP/1.1|201|329
20120608094317|5|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/maven-metadata.xml.sha1|HTTP/1.1|200|40
20120608094318|4|REQUEST|172.31.36.47|jmdahli|PUT|/wrttmvn/kclee/javancss.javancss/maven-metadata.xml.md5|HTTP/1.1|200|32


--
View this message in context: 
http://forums.jfrog.org/mvn-deploy-deploy-file-gives-403-while-mvn-deploy-works-tp7578003.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to