Maven deploy fails ... ReasonPhrase:Forbidden

2,614 views
Skip to first unread message

Jeff

unread,
Feb 16, 2012, 1:29:15 PM2/16/12
to jenkins...@googlegroups.com
FWIW, this used to work last week.
 
I am able to run 'mvn deploy' from the command-line on the Jenkins box in the job 'workspace' folder just fine using my 'deployuser' account settings in the Maven settings.xml.
 
I can upload artifacts from the Archiva web application using the same 'deployuser' account .
 
I have even given the Archiva 'guest' account full rights in case for some reason it wasn't reading the maven settings.xml file correctly that contains the username and password.
 
Still, I get the error below when my Archiva job attempts to deploy.
 
I'm at my wits end.  I don't know what else to look for.  Any ideas why the Jenkins job can't upload anymore?
 
 
[INFO] Deployment in http://10.9.3.12:8220/archiva (id=snapshots,uniqueVersion=true)
Deploying the main artifact Shared-2012.02.22-SNAPSHOT.jar
Downloading: http://10.9.3.12:8220/archiva/Shared/2012.02.22-SNAPSHOT/maven-metadata.xml
Uploading: http://10.9.3.12:8220/archiva/Shared/2012.02.22-SNAPSHOT/Shared-2012.02.22-20120216.153026-1.jar
Uploading: http://10.9.3.12:8220/archiva/Shared/2012.02.22-SNAPSHOT/Shared-2012.02.22-20120216.153026-1.pom
ERROR: Failed to deploy artifacts: Could not transfer artifact Shared:jar:2012.02.22-20120216.153026-1 from/to snapshots (http://10.9.3.12:8220/archiva): Access denied to: http://10.9.3.12:8220/archiva/Shared/2012.02.22-SNAPSHOT/Shared-2012.02.22-20120216.153026-1.jar, ReasonPhrase:Forbidden.
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact Shared:jar:2012.02.22-20120216.153026-1 from/to snapshots (http://10.9.3.12:8220/archiva): Access denied to: http://10.9.3.12:8220/archiva/Shared/2012.02.22-SNAPSHOT/Shared-2012.02.22-20120216.153026-1.jar, ReasonPhrase:Forbidden.
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)

--
Jeff Vincent
preda...@gmail.com
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox !! 

Jeff

unread,
Feb 16, 2012, 6:33:53 PM2/16/12
to jenkins...@googlegroups.com
I know I posted this eariler today, but I have a bit more information.
 
Since I can perform 'mvn deploy' from the command line, I disabled the 'Deploy artifacts to Maven repository' post-build option and just used the following in my Maven "Goals and options":
 
    clean install deploy
 
It worked!
 
Then re-enabled  the  'Deploy artifacts to Maven repository'  option and reverted my 'Goals and options' to just "clean install"
 
I then used wireshark and was able to verify that the  'Deploy artifacts to Maven repository' option is sending the correct user name/password (Basic-auth) and thus it is reading the correct settings.xml.
 
What is so different between the 'mvn deploy' and  'Deploy artifacts to Maven repository' post-build action? 
 
How can I enable more debug output for the  'Deploy artifacts to Maven repository'  post-build action?
Reply all
Reply to author
Forward
0 new messages