Deployment of SA in repository (nexus) fails
--------------------------------------------

                 Key: SM-1948
                 URL: https://issues.apache.org/activemq/browse/SM-1948
             Project: ServiceMix
          Issue Type: Bug
          Components: tooling
    Affects Versions: 3.3.1, 3.3, 3.2.3, 3.2.2
         Environment: Nexus Repository Manager
            Reporter: Erhard Siegl


When deploying to Maven-repository which which doesn't allow overwriting of 
existing artifacts, deploying of SAs fails. For Nexus the following exception 
occurs:

[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-deploy-plugin:2.4:deploy' -->
[DEBUG]   (f) artifact = 
org.apache.servicemix.samples:camel-sa:jbi-service-assembly:3.3.1
[DEBUG]   (f) attachedArtifacts = 
[org.apache.servicemix.samples:camel-sa:zip:3.3.1]
[DEBUG]   (f) deploymentRepository = 
Repository[bva-releases|http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases]
[DEBUG]   (s) localRepository = 
Repository[local|file:///home/siegl/.m2/repository]
[DEBUG]   (f) packaging = jbi-service-assembly
[DEBUG]   (f) pomFile = 
/home/siegl/apache-servicemix-3.3.1/examples/camel/camel-sa/pom.xml
[DEBUG]   (f) skip = false
[DEBUG]   (f) updateReleaseInfo = false
[DEBUG] -- end configuration --
[INFO] [deploy:deploy {execution: default-deploy}]
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] not adding permissions to wagon connection
Uploading: 
http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip
30K uploaded  (camel-sa-3.3.1.zip)
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[INFO] Retrieving previous metadata from bva-releases
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] Connecting to repository: 'bva-releases' with url: 
'http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases'.
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[INFO] repository metadata for: 'artifact 
org.apache.servicemix.samples:camel-sa' could not be found on repository: 
bva-releases, so will be created
[INFO] Uploading repository metadata for: 'artifact 
org.apache.servicemix.samples:camel-sa'
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] not adding permissions to wagon connection
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[INFO] Uploading project information for camel-sa 3.3.1
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] not adding permissions to wagon connection
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] not adding permissions to wagon connection
Uploading: 
http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip
[DEBUG] Using Wagon implementation lightweight from default mapping for 
protocol http
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file: 
http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip.
 Return code is: 400

[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying 
artifact: Failed to transfer file: 
http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip.
 Return code is: 400
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error deploying 
artifact: Failed to transfer file: 
http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip.
 Return code is: 400
        at 
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: 
Error deploying artifact: Failed to transfer file: 
http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip.
 Return code is: 400
        at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:121)
        at 
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:190)
        ... 19 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer 
file: 
http://bvalx01d.bva.sozvers.at:8082/nexus/content/repositories/releases/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip.
 Return code is: 400
        at 
org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:205)
        at 
org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413)
        at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392)
        at 
org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365)
        at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
        at 
org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:317)
        at 
org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:227)
        at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:107)
        ... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Mon Apr 12 09:29:09 CEST 2010
[INFO] Final Memory: 56M/396M
[INFO] ------------------------------------------------------------------------


As can be seen above, maven tries to upload the artifact camel-sa-3.3.1.zip 
twice. The first suceeds, the second fails, since overwriting of artefacts in 
the repository is not allowed.
Appearently the the first upload comes from the main artifact
[DEBUG]   (f) artifact = 
org.apache.servicemix.samples:camel-sa:jbi-service-assembly:3.3.1
and the second from
[DEBUG]   (f) attachedArtifacts = 
[org.apache.servicemix.samples:camel-sa:zip:3.3.1]

Similar behavior can be seen for simple install, where the jar is copied to a 
zip, which is overwritten by the actual SA.
> mvn install
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
/home/siegl/apache-servicemix-3.3.1/examples/camel/camel-sa/target/camel-sa-3.3.1.jar
 to 
/home/siegl/.m2/repository/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip
[INFO] Installing 
/home/siegl/apache-servicemix-3.3.1/examples/camel/camel-sa/target/camel-sa-3.3.1.zip
 to 
/home/siegl/.m2/repository/org/apache/servicemix/samples/camel-sa/3.3.1/camel-sa-3.3.1.zip





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to