Deploying to a hosted repository

View: New views
2 Messages — Rating Filter:   Alert me  

Deploying to a hosted repository

by Andrew Chandler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After upgrading hudson I'm able to get a more intelligent error out of it.  I'm able to deploy to nexus using scp settings in the settings.xml/pom files using mvn deploy.   However if I want to let my build system deploy only if all modules successfully compile I am stuck.   This used to work with proxmity, we simply used a "dav" url.      Using http to do the upload though is failing.   I'm wondering if somehow security is set wrong etc?   I have no way to specify a username and password on this deployment url.    I tried adding the "deploy" capability to the anonymous user but I'm not sure that gets me everything I need.   Looking in the nexus admin console the mirror I'm having trouble with is of type "snapshot" - and logged in as admin I get the "browse", "configuration" "mirrors" tabs but no upload tab.   If I change the repository to release I get an upload tab but I have no idea why the difference or if its even relevant to the deployment issue.     Is there any way using a web browser or some simple test program that we can validate my snapshot repository is setup correctly to permit publishing updates via http?????

Any help is appreciated.


Deploying the main artifact vnd_project-1.1-SNAPSHOT.pom
[INFO ] Retrieving previous build number from 
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file: http://ourmachine.visionael.com:8091/nexus/content/repositories/inhouse.snapshot/com/visionael/vnd_project/1.1-SNAPSHOT/vnd_project-1.1-SNAPSHOT.pom. Return code is: 401
	at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:94)
	at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:119)
	at hudson.maven.reporters.MavenAggregatedArtifactRecord.deploy(MavenAggregatedArtifactRecord.java:79)
	at hudson.maven.reporters.MavenAbstractArtifactRecord$1.perform(MavenAbstractArtifactRecord.java:213)
	at hudson.model.TaskThread.run(TaskThread.java:118)
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://ourmachine.visionael.com:8091/nexus/content/repositories/inhouse.snapshot/com/visionael/vnd_project/1.1-SNAPSHOT/vnd_project-1.1-SNAPSHOT.pom. Return code is: 401
	at org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:172)
	at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:244)
	at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:160)
	at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80)	

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Re: Deploying to a hosted repository

by Brian Fox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've never trusted hudson to do my deploys, instead I run a mvn
deploy. I'd be surprised if hudson really provided no way to set
credentials, perhaps it uses the maven settings, but I don't really
know for sure. I can see from the stack trace that it's using the http
wagon, so that looks ok and the urls appear correct, so somehow the
auth is wrong. Look in the rss feeds or the logs to see what user is
being sent, that might give you a starting point.

On Tue, Oct 6, 2009 at 11:40 AM, Andrew Chandler <andy@...> wrote:

> After upgrading hudson I'm able to get a more intelligent error out of it.
> I'm able to deploy to nexus using scp settings in the settings.xml/pom files
> using mvn deploy.   However if I want to let my build system deploy only if
> all modules successfully compile I am stuck.   This used to work with
> proxmity, we simply used a "dav" url.      Using http to do the upload
> though is failing.   I'm wondering if somehow security is set wrong etc?   I
> have no way to specify a username and password on this deployment url.    I
> tried adding the "deploy" capability to the anonymous user but I'm not sure
> that gets me everything I need.   Looking in the nexus admin console the
> mirror I'm having trouble with is of type "snapshot" - and logged in as
> admin I get the "browse", "configuration" "mirrors" tabs but no upload
> tab.   If I change the repository to release I get an upload tab but I have
> no idea why the difference or if its even relevant to the deployment
> issue.     Is there any way using a web browser or some simple test program
> that we can validate my snapshot repository is setup correctly to permit
> publishing updates via http?????
>
> Any help is appreciated.
>
>
> Deploying the main artifact vnd_project-1.1-SNAPSHOT.pom
>
> [INFO ] Retrieving previous build number from
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error
> deploying artifact: Failed to transfer file:
> http://ourmachine.visionael.com:8091/nexus/content/repositories/inhouse.snapshot/com/visionael/vnd_project/1.1-SNAPSHOT/vnd_project-1.1-SNAPSHOT.pom.
> Return code is: 401
> at
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:94)
> at
> hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:119)
> at
> hudson.maven.reporters.MavenAggregatedArtifactRecord.deploy(MavenAggregatedArtifactRecord.java:79)
> at
> hudson.maven.reporters.MavenAbstractArtifactRecord$1.perform(MavenAbstractArtifactRecord.java:213)
> at hudson.model.TaskThread.run(TaskThread.java:118)
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to
> transfer file:
> http://ourmachine.visionael.com:8091/nexus/content/repositories/inhouse.snapshot/com/visionael/vnd_project/1.1-SNAPSHOT/vnd_project-1.1-SNAPSHOT.pom.
> Return code is: 401
> at
> org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:172)
> at
> org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:244)
> at
> org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:160)
> at
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80)
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...