[JIRA] Updated: (JENKINS-11248) Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts

1,803 views
Skip to first unread message

mrasmussen@luthresearch.com (JIRA)

unread,
Oct 6, 2011, 8:18:19 PM10/6/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Rasmussen updated JENKINS-11248:
----------------------------------------

Description:
Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

{quote}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.303s
[INFO] Finished at: Thu Oct 06 22:41:54 GMT 2011
[INFO] Final Memory: 81M/193M
[INFO] ------------------------------------------------------------------------
channel stopped
Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml
[INFO] Deployment in dav:http://maven.luthresearch.com/nexus/content/repositories/releases (id=com.luthresearch,uniqueVersion=true)
Deploying the main artifact surveysavvy-member-0.6.2.pom
Uploading: dav:http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom
Uploaded: dav:http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom (3 KB at 59.8 KB/sec)
Uploading: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom
ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.surveysavvy.member:surveysavvy-member:pom:0.6.2 from/to com.luthresearch (dav:http://maven.luthresearch.com/nexus/content/repositories/releases): Failed to transfer file: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom. Return code is: 400
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.surveysavvy.member:surveysavvy-member:pom:0.6.2 from/to com.luthresearch (dav:http://maven.luthresearch.com/nexus/content/repositories/releases): Failed to transfer file: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom. Return code is: 400
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
at hudson.model.Run.run(Run.java:1428)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact
{quote}

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

was:
Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

<code>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.303s
[INFO] Finished at: Thu Oct 06 22:41:54 GMT 2011
[INFO] Final Memory: 81M/193M
[INFO] ------------------------------------------------------------------------
channel stopped
Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml
[INFO] Deployment in dav:http://maven.luthresearch.com/nexus/content/repositories/releases (id=com.luthresearch,uniqueVersion=true)
Deploying the main artifact surveysavvy-member-0.6.2.pom
Uploading: dav:http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom
Uploaded: dav:http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom (3 KB at 59.8 KB/sec)
Uploading: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom
ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.surveysavvy.member:surveysavvy-member:pom:0.6.2 from/to com.luthresearch (dav:http://maven.luthresearch.com/nexus/content/repositories/releases): Failed to transfer file: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom. Return code is: 400
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.surveysavvy.member:surveysavvy-member:pom:0.6.2 from/to com.luthresearch (dav:http://maven.luthresearch.com/nexus/content/repositories/releases): Failed to transfer file: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom. Return code is: 400
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
at hudson.model.Run.run(Run.java:1428)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact
</code>

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.


> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.
> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:
> {quote}
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 58.303s
> [INFO] Finished at: Thu Oct 06 22:41:54 GMT 2011
> [INFO] Final Memory: 81M/193M
> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml
> [INFO] Deployment in dav:http://maven.luthresearch.com/nexus/content/repositories/releases (id=com.luthresearch,uniqueVersion=true)
> Deploying the main artifact surveysavvy-member-0.6.2.pom
> Uploading: dav:http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom
> Uploaded: dav:http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom (3 KB at 59.8 KB/sec)
> Uploading: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom
> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.surveysavvy.member:surveysavvy-member:pom:0.6.2 from/to com.luthresearch (dav:http://maven.luthresearch.com/nexus/content/repositories/releases): Failed to transfer file: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.surveysavvy.member:surveysavvy-member:pom:0.6.2 from/to com.luthresearch (dav:http://maven.luthresearch.com/nexus/content/repositories/releases): Failed to transfer file: http://maven.luthresearch.com/nexus/content/repositories/releases/com/luthresearch/surveysavvy/member/surveysavvy-member/0.6.2/surveysavvy-member-0.6.2.pom. Return code is: 400
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)
> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact
> {quote}
> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


mrasmussen@luthresearch.com (JIRA)

unread,
Oct 6, 2011, 8:14:19 PM10/6/11
to jenkinsc...@googlegroups.com
Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
--------------------------------------------------------------------------------------------------------------------

Key: JENKINS-11248
URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
Project: Jenkins
Issue Type: Bug
Components: deploy, maven2
Affects Versions: current
Environment: OS: CentOS release 5.5 (Final)
Jenkins: 1.433
Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
Reporter: Michael Rasmussen


Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar. Something like the following:
project_folder/
|_servicename.business/
| \_pom.xml
|_servicename.jms/
| \_pom.xml
|_servicename.model/
| \_pom.xml
|_servicename.webservice/
| \_pom.xml
\_pom.xml

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

[INFO] ------------------------------------------------------------------------

CONFIRMATION OF ISSUE:

mrasmussen@luthresearch.com (JIRA)

unread,
Oct 6, 2011, 8:16:19 PM10/6/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Rasmussen updated JENKINS-11248:
----------------------------------------

Description:

Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

<code>

</code>

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

was:


Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar. Something like the following:

<pre>


project_folder/
|_servicename.business/
| \_pom.xml
|_servicename.jms/
| \_pom.xml
|_servicename.model/
| \_pom.xml
|_servicename.webservice/
| \_pom.xml
\_pom.xml

</pre>

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

<code>

</code>

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> <code>

> </code>

mrasmussen@luthresearch.com (JIRA)

unread,
Oct 6, 2011, 8:16:19 PM10/6/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Rasmussen updated JENKINS-11248:
----------------------------------------

Description:

Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar. Something like the following:

<pre>


project_folder/
|_servicename.business/
| \_pom.xml
|_servicename.jms/
| \_pom.xml
|_servicename.model/
| \_pom.xml
|_servicename.webservice/
| \_pom.xml
\_pom.xml

</pre>

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

<code>

</code>

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

was:

> <pre>


> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> </pre>


> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> <code>

> </code>

mrasmussen@luthresearch.com (JIRA)

unread,
Oct 6, 2011, 8:24:19 PM10/6/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Rasmussen updated JENKINS-11248:
----------------------------------------

Description:

Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:

{noformat}


project_folder/
|_servicename.business/
| \_pom.xml
|_servicename.jms/
| \_pom.xml
|_servicename.model/
| \_pom.xml
|_servicename.webservice/
| \_pom.xml
\_pom.xml

{noformat}

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

{quote}

{quote}

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

was:


Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

{quote}

{quote}

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:

> {noformat}


> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}

> {quote}

kk@kohsuke.org (JIRA)

unread,
Oct 10, 2011, 6:37:19 PM10/10/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=153796#comment-153796 ]

Kohsuke Kawaguchi commented on JENKINS-11248:
---------------------------------------------

If you still have the original console output, please paste the entire stack trace including all the nested exceptions. The crucial lines are missing.

I also wonder if you can create a stripped-down test case for us to reproduce the problem. It just needs to contain enough of your Maven project (but none of the source code). This would tremendously simplify our effort to fix this issue.

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}

> {quote}

mrasmussen@luthresearch.com (JIRA)

unread,
Oct 20, 2011, 7:34:22 PM10/20/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=154441#comment-154441 ]

Michael Rasmussen commented on JENKINS-11248:
---------------------------------------------

I will work on getting you a test case to work from.
Unfortunately the build I originally referenced got automatically deleted, but I have the following output from a different job (same project structure) that had the same error.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

[INFO] Total time: 52.240s
[INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
[INFO] Final Memory: 63M/151M


[INFO] ------------------------------------------------------------------------
channel stopped
Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

[ERROR] uniqueVersion == false is not anymore supported in maven 3
[INFO] Deployment in dav:http://maven.luthresearch.net/nexus/content/repositories/releases/ (id=com.luthresearch,uniqueVersion=false)
Deploying the main artifact savvyconnect-1.0.1.pom
Uploading: dav:http://maven.luthresearch.net/nexus/content/repositories/releases/com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom
Uploaded: dav:http://maven.luthresearch.net/nexus/content/repositories/releases/com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom (3 KB at 24.4 KB/sec)
Uploading: http://maven.luthresearch.net/nexus/content/repositories/releases/com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom
ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
at hudson.model.Run.run(Run.java:1428)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 11 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
... 14 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
... 15 more
[INFO] Deployment failed after 0.27 sec
Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
Sending e-mails to: devs...@luthresearch.com
Finished: FAILURE

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}

> {quote}

mrasmussen@luthresearch.com (JIRA)

unread,
Oct 20, 2011, 7:36:21 PM10/20/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Rasmussen updated JENKINS-11248:
----------------------------------------

Description:

Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
{noformat}

project_folder/
|_servicename.business/
| \_pom.xml
|_servicename.jms/
| \_pom.xml
|_servicename.model/
| \_pom.xml
|_servicename.webservice/
| \_pom.xml
\_pom.xml

{noformat}

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

{quote}


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

[INFO] Total time: 52.240s
[INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
[INFO] Final Memory: 63M/151M


[INFO] ------------------------------------------------------------------------
channel stopped
Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
at hudson.model.Run.run(Run.java:1428)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 11 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
... 14 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
... 15 more
[INFO] Deployment failed after 0.27 sec
Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
Sending e-mails to: devs...@luthresearch.com
Finished: FAILURE

{quote}

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

was:


Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
{noformat}

project_folder/
|_servicename.business/
| \_pom.xml
|_servicename.jms/
| \_pom.xml
|_servicename.model/
| \_pom.xml
|_servicename.webservice/
| \_pom.xml
\_pom.xml

{noformat}

Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.

Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.

Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.

WHAT IS GOING WRONG:
The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.

Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

{quote}

{quote}

CONFIRMATION OF ISSUE:
I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.

WORKAROUND:
I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE

> {quote}

ronenpg@gmail.com (JIRA)

unread,
Nov 24, 2011, 5:39:17 AM11/24/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155772#comment-155772 ]

Ronen Peleg commented on JENKINS-11248:
---------------------------------------

Same issue here!

For some unknown reason the Jenkins trying to deploy the same pom file to repository... I think it's a bug in the "Deploy artifacts to Maven repository" Jenkins Plugin.

Any solution for this issue? thanks.

Here is my console log:

Uploaded: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom (68 KB at 789.0 KB/sec)

Uploading: http://ilbldlnx07.memycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom

ERROR: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)


at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)

at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:989)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
at hudson.model.Run.run(Run.java:1429)


at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

[INFO] Deployment failed after 8 sec


Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE

Finished: FAILURE


> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

ronenpg@gmail.com (JIRA)

unread,
Nov 24, 2011, 5:39:17 AM11/24/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155772#comment-155772 ]

Ronen Peleg edited comment on JENKINS-11248 at 11/24/11 10:39 AM:
------------------------------------------------------------------

Same issue here!

For some unknown reason the Jenkins trying to deploy the same pom file to repository... I think it's a bug in the "Deploy artifacts to Maven repository" Jenkins Plugin.

Any solution for this issue? thanks.

Here is my console log:

Uploading: http://ilbldlnx07.memycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom

ERROR: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)


at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)

at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:989)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
at hudson.model.Run.run(Run.java:1429)

at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

.
.
.


[INFO] Deployment failed after 8 sec
Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
Finished: FAILURE


was (Author: ronenpg):
Same issue here!

For some unknown reason the Jenkins trying to deploy the same pom file to repository... I think it's a bug in the "Deploy artifacts to Maven repository" Jenkins Plugin.

Any solution for this issue? thanks.

Here is my console log:

Uploading: http://ilbldlnx07.memycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom

ERROR: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)


at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)

at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:989)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
at hudson.model.Run.run(Run.java:1429)

at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

[INFO] Deployment failed after 8 sec


Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
Finished: FAILURE

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

ronenpg@gmail.com (JIRA)

unread,
Nov 24, 2011, 5:43:17 AM11/24/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155772#comment-155772 ]

Ronen Peleg edited comment on JENKINS-11248 at 11/24/11 10:41 AM:
------------------------------------------------------------------

Same issue here!

For some unknown reason the Jenkins trying to deploy the same pom file to repository... I think it's a bug in the "Deploy artifacts to Maven repository" Jenkins Plugin.

Jenkins version: 1.440
Maven version: 3.0.3

Any solution for this issue will be great, Thanks.


Here is my console log:

Uploading: http://ilbldlnx07.memycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom

ERROR: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)


at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)

at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:989)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
at hudson.model.Run.run(Run.java:1429)

at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

.
.
.
[INFO] Deployment failed after 8 sec
Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
Finished: FAILURE


was (Author: ronenpg):
Same issue here!

For some unknown reason the Jenkins trying to deploy the same pom file to repository... I think it's a bug in the "Deploy artifacts to Maven repository" Jenkins Plugin.

Any solution for this issue? thanks.

Here is my console log:

Uploading: http://ilbldlnx07.memycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom

ERROR: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.mycompany.sw.security.bsf:aum-build-cfg:pom:6.00.00_jdk_6_6 from/to MYPRODUCT_6_JDK1_6 (http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6): Failed to transfer file: http://ilbldlnx07.mycompany:8081/nexus/content/repositories/MYPRODUCT_6_JDK1_6/com/mycompany/sw/security/bsf/aum-build-cfg/6.00.00_jdk_6_6/aum-build-cfg-6.00.00_jdk_6_6.pom. Return code is: 400

at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)


at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)

at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:989)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
at hudson.model.Run.run(Run.java:1429)

at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

.
.
.
[INFO] Deployment failed after 8 sec
Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
Finished: FAILURE

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

olamy@apache.org (JIRA)

unread,
Nov 24, 2011, 9:53:17 AM11/24/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155779#comment-155779 ]

olamy commented on JENKINS-11248:
---------------------------------

are you using maven release plugin in your job here ?



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

ronenpg@gmail.com (JIRA)

unread,
Nov 24, 2011, 2:47:17 PM11/24/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155794#comment-155794 ]

Ronen Peleg commented on JENKINS-11248:
---------------------------------------

I checked the option "Deploy artifacts to Maven repository" in my release Job.

BTW: In snapshot job this option working great, I have this error (return code 400) only in release Job although I using only build number every build.



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen
>

> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

olamy@apache.org (JIRA)

unread,
Nov 25, 2011, 3:04:17 AM11/25/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

olamy reassigned JENKINS-11248:
-------------------------------

Assignee: olamy



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy


>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

olamy@apache.org (JIRA)

unread,
Nov 25, 2011, 4:39:17 AM11/25/11
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155816#comment-155816 ]

olamy commented on JENKINS-11248:
---------------------------------

Can I have more details ?
The goals you configured in your job and how the release plugins is configured especially: preparationGoals.


> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

metcox@gmail.com (JIRA)

unread,
Jan 6, 2012, 3:18:59 PM1/6/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157493#comment-157493 ]

mathieu bernatet commented on JENKINS-11248:
--------------------------------------------

I also have this bug. It occurs when the main artifact is an pom file. I have reproduced it from the trunk without additional plugin and a simple maven project containing the following pom file:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.metcox.lab.jenkins</groupId>
<artifactId>simplePom</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
</project>

The job is a maven 2/3 project using the 'Deploy artifacts to Maven repository' post-build action.

The bug seems to happen in the hudson.maven.reporters.MavenArtifactRecord.deploy() method when it checks if the mainArtifact is a pom file. This test relies on the hudson.maven.reporters.MavenArtifact.isPOM() method which checks if the filename ends with the '.pom'string. It seems buggy to me because a pom filename is pom.xml and never ends with '.pom'.
This causes the double addition of the pom artifact for deployment.


> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

metcox@gmail.com (JIRA)

unread,
Jan 6, 2012, 6:16:00 PM1/6/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157493#comment-157493 ]

Mathieu Bernatet edited comment on JENKINS-11248 at 1/6/12 11:15 PM:
---------------------------------------------------------------------

I also have this bug. It occurs when the main artifact is an pom file. I have reproduced it from the trunk (1.448-SNAPSHOT) without additional plugin and a simple maven project containing the following pom file:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.metcox.lab.jenkins</groupId>
<artifactId>simplePom</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
</project>

The job is a maven 2/3 project, builed with maven 3.0 executing the goal 'install', and the 'Deploy artifacts to Maven repository' post-build action.

The bug seems to happen in the hudson.maven.reporters.MavenArtifactRecord.deploy() method when it checks if the mainArtifact is a pom file. This test relies on the hudson.maven.reporters.MavenArtifact.isPOM() method which checks if the filename ends with the '.pom'string. It seems buggy to me because a pom filename is pom.xml and never ends with '.pom'.
This causes the double addition of the pom artifact for deployment.


was (Author: metcox):


I also have this bug. It occurs when the main artifact is an pom file. I have reproduced it from the trunk without additional plugin and a simple maven project containing the following pom file:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.metcox.lab.jenkins</groupId>
<artifactId>simplePom</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
</project>

The job is a maven 2/3 project using the 'Deploy artifacts to Maven repository' post-build action.

The bug seems to happen in the hudson.maven.reporters.MavenArtifactRecord.deploy() method when it checks if the mainArtifact is a pom file. This test relies on the hudson.maven.reporters.MavenArtifact.isPOM() method which checks if the filename ends with the '.pom'string. It seems buggy to me because a pom filename is pom.xml and never ends with '.pom'.
This causes the double addition of the pom artifact for deployment.

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

metcox@gmail.com (JIRA)

unread,
Jan 7, 2012, 7:07:00 AM1/7/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157493#comment-157493 ]

Mathieu Bernatet edited comment on JENKINS-11248 at 1/7/12 12:05 PM:
---------------------------------------------------------------------

I also have this bug. It occurs when the main artifact is an pom file. I have reproduced it from the trunk (1.448-SNAPSHOT) without additional plugin and a simple maven project containing the following pom file:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.metcox.lab.jenkins</groupId>
<artifactId>simplePom</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
</project>

The job is a maven 2/3 project, built with maven 3.0 executing the goal 'install', and the 'Deploy artifacts to Maven repository' post-build action.

The bug seems to happen in the hudson.maven.reporters.MavenArtifactRecord.deploy() method when it checks if the mainArtifact is a pom file. This test relies on the hudson.maven.reporters.MavenArtifact.isPOM() method which checks if the filename ends with the '.pom'string. It seems buggy to me because a pom filename is pom.xml and never ends with '.pom'.
This causes the double addition of the pom artifact for deployment.


was (Author: metcox):
I also have this bug. It occurs when the main artifact is an pom file. I have reproduced it from the trunk (1.448-SNAPSHOT) without additional plugin and a simple maven project containing the following pom file:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.metcox.lab.jenkins</groupId>
<artifactId>simplePom</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
</project>

The job is a maven 2/3 project, builed with maven 3.0 executing the goal 'install', and the 'Deploy artifacts to Maven repository' post-build action.

The bug seems to happen in the hudson.maven.reporters.MavenArtifactRecord.deploy() method when it checks if the mainArtifact is a pom file. This test relies on the hudson.maven.reporters.MavenArtifact.isPOM() method which checks if the filename ends with the '.pom'string. It seems buggy to me because a pom filename is pom.xml and never ends with '.pom'.
This causes the double addition of the pom artifact for deployment.

> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

metcox@gmail.com (JIRA)

unread,
Jan 7, 2012, 11:13:59 AM1/7/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157504#comment-157504 ]

Mathieu Bernatet commented on JENKINS-11248:
--------------------------------------------

To be more precise, the pom filename may be different than pom.xml, like simplePom-1.0.0.pom, but probably not in this context. Nevertheless, it may be unreliable to use the filename to determine that the artifact is a pom file.



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

olamy@apache.org (JIRA)

unread,
Jan 9, 2012, 4:11:51 PM1/9/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157626#comment-157626 ]

olamy commented on JENKINS-11248:
---------------------------------

As I can see you are using release plugin.
What is the value of 'goals' field for the release plugin configuration ?



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

metcox@gmail.com (JIRA)

unread,
Jan 9, 2012, 6:19:53 PM1/9/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157629#comment-157629 ]

Mathieu Bernatet commented on JENKINS-11248:
--------------------------------------------

i'm not using release plugin.

here is the full console output of the job using maven 3.0.3 this time, hope this help.

Démarré par l'utilisateur anonymous
Building in workspace /home/metcox/dev/workspaces/jenkins-core/jenkins/war/work/workspace/simplePom
Checking out a fresh workspace because there's no workspace at /home/metcox/dev/workspaces/jenkins-core/jenkins/war/work/workspace/simplePom
Cleaning workspace /home/metcox/dev/workspaces/jenkins-core/jenkins/war/work/workspace/simplePom
Checking out file:///home/metcox/dev/scm/svn/repos/org/metcox/lab/maven/trunk/simplePom
AU pom.xml
At revision 56
Parsing POMs
Un nouveau module org.metcox.lab.jenkins:simplePom simplePom a été trouvé
Modules changed, recalculating dependency graph
[simplePom] $ java -cp /home/metcox/.m2/repository/org/jenkins-ci/main/maven/maven3-agent/1.2/maven3-agent-1.2.jar:/home/metcox/dev/tools/maven/apache-maven-3.0.3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/metcox/dev/tools/maven/apache-maven-3.0.3 /home/metcox/.m2/repository/org/jenkins-ci/main/remoting/2.12/remoting-2.12.jar /home/metcox/.m2/repository/org/jenkins-ci/main/maven/maven3-interceptor/1.2/maven3-interceptor-1.2.jar 39140
<===[JENKINS REMOTING CAPACITY]===>���channel started
Executing Maven: -B -f /home/metcox/dev/workspaces/jenkins-core/jenkins/war/work/workspace/simplePom/pom.xml clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simplePom 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ simplePom ---
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ simplePom ---
[INFO] Installing /home/metcox/dev/workspaces/jenkins-core/jenkins/war/work/workspace/simplePom/pom.xml to /home/metcox/.m2/repository/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom
[JENKINS] Archiving /home/metcox/dev/workspaces/jenkins-core/jenkins/war/work/workspace/simplePom/pom.xml to /home/metcox/dev/workspaces/jenkins-core/jenkins/war/work/jobs/simplePom/modules/org.metcox.lab.jenkins$simplePom/builds/2012-01-10_00-01-15/archive/org.metcox.lab.jenkins/simplePom/1.0.0/simplePom-1.0.0.pom


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

[INFO] Total time: 3.823s
[INFO] Finished at: Tue Jan 10 00:01:22 CET 2012
[INFO] Final Memory: 3M/61M
[INFO] ------------------------------------------------------------------------
channel stopped
Maven RedeployPublished use remote maven settings from : /home/metcox/.m2/settings.xml
[INFO] Deployment in http://localhost:8081/nexus/content/repositories/releases (id=releases,uniqueVersion=true)
Déploiement de l'artefact principal simplePom-1.0.0.pom
Uploading: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom
Uploaded: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom (389 B at 1.4 KB/sec)
Uploading: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom
ERROR: Failed to deploy artifacts: Could not transfer artifact org.metcox.lab.jenkins:simplePom:pom:1.0.0 from/to releases (http://localhost:8081/nexus/content/repositories/releases): Failed to transfer file: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom. Return code is: 400, ReasonPhrase:Bad Request.
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact org.metcox.lab.jenkins:simplePom:pom:1.0.0 from/to releases (http://localhost:8081/nexus/content/repositories/releases): Failed to transfer file: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom. Return code is: 400, ReasonPhrase:Bad Request.
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)


at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)

at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:998)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622)
at hudson.model.Run.run(Run.java:1429)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact org.metcox.lab.jenkins:simplePom:pom:1.0.0 from/to releases (http://localhost:8081/nexus/content/repositories/releases): Failed to transfer file: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom. Return code is: 400, ReasonPhrase:Bad Request.
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:280)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:211)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:443)


at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 11 more

Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.metcox.lab.jenkins:simplePom:pom:1.0.0 from/to releases (http://localhost:8081/nexus/content/repositories/releases): Failed to transfer file: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom. Return code is: 400, ReasonPhrase:Bad Request.
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:950)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:837)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:467)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:274)
... 14 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://localhost:8081/nexus/content/repositories/releases/org/metcox/lab/jenkins/simplePom/1.0.0/simplePom-1.0.0.pom. Return code is: 400, ReasonPhrase:Bad Request.
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:562)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:471)
at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:451)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:811)
... 16 more
[INFO] Deployment failed after 38 s
Build step 'Déployer les artefacts dans le repository Maven' changed build result to FAILURE
Finished: FAILURE


> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

olamy@apache.org (JIRA)

unread,
Jan 12, 2012, 3:51:51 PM1/12/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157756#comment-157756 ]

olamy commented on JENKINS-11248:
---------------------------------

will be in 1.449



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

dogfood@java.net (JIRA)

unread,
Jan 12, 2012, 6:14:51 PM1/12/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=157763#comment-157763 ]

dogfood commented on JENKINS-11248:
-----------------------------------

Integrated in !http://ci.jenkins-ci.org/images/16x16/blue.png! [jenkins_main_trunk #1473|http://ci.jenkins-ci.org/job/jenkins_main_trunk/1473/]
[JENKINS-11248] Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts.
changelog entry for JENKINS-11248

Olivier Lamy : [1d2012b792fbd865953cf5c51ee95ddbe189758c|https://github.com/jenkinsci/jenkins/commit/1d2012b792fbd865953cf5c51ee95ddbe189758c]
Files :
* maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java

Olivier Lamy : [53cea6a0810ff28ba0e6887532260496e6a69846|https://github.com/jenkinsci/jenkins/commit/53cea6a0810ff28ba0e6887532260496e6a69846]
Files :
* changelog.html


> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

outro666@mail.ru (JIRA)

unread,
Mar 19, 2012, 2:34:24 PM3/19/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160418#comment-160418 ]

Alexander Potapov commented on JENKINS-11248:
---------------------------------------------

Today I had similar problem. I don't know if my issue related to this one mentioned here...
But I have Nexus repository which is configured for releases.
When I was trying to deploy snapshot there I got similar exception (Return code is: 400, ReasonPhrase:Bad Request).
After changing project version in POM to non snapshot version, build succeeded.
Maybe it is related to maven repository setup or repository URLs specified, for instance, in POM file.
Anyway, I think you are trying to deploy snapshot into releases repository.


> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

mrasmussen@luthresearch.com (JIRA)

unread,
Mar 19, 2012, 2:56:25 PM3/19/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160419#comment-160419 ]

Michael Rasmussen commented on JENKINS-11248:
---------------------------------------------

[~outro] No, we were not trying to deploy snapshots to our releases repository. We have both http://<hostname>/nexus/content/repositories/*releases*/ and http://<hostname>/nexus/content/repositories/*snapshots*/ properly defined in our POMs for deploying.

Anyway, there was a fix released for this in 1.449. We are still on 1.447, so I haven't had a chance to confirm and close the bug.



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

mrasmussen@luthresearch.com (JIRA)

unread,
Mar 19, 2012, 7:42:24 PM3/19/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Rasmussen resolved JENKINS-11248.
-----------------------------------------

Fix Version/s: current
Resolution: Fixed



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
> Fix For: current


>
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

mrasmussen@luthresearch.com (JIRA)

unread,
Mar 19, 2012, 7:44:24 PM3/19/12
to jenkinsc...@googlegroups.com

[ https://issues.jenkins-ci.org/browse/JENKINS-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Rasmussen closed JENKINS-11248.
---------------------------------------


[~trekoid] has tested with his installation and is no longer seeing the issue.



> Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-11248
> URL: https://issues.jenkins-ci.org/browse/JENKINS-11248
> Project: Jenkins
> Issue Type: Bug
> Components: deploy, maven2
> Affects Versions: current
> Environment: OS: CentOS release 5.5 (Final)
> Jenkins: 1.433
> Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
> Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.18-194.32.1.el5", arch: "amd64", family: "unix"
> Reporter: Michael Rasmussen

> Assignee: olamy
> Fix For: current
>
>
> Scenario: We have several sets of Java OSGi services with a parent pom and 4 child projects/poms. The parent pom does not generate any JARs, but each of the children generates a jar.Something like the following:
> {noformat}

> project_folder/
> |_servicename.business/
> | \_pom.xml
> |_servicename.jms/
> | \_pom.xml
> |_servicename.model/
> | \_pom.xml
> |_servicename.webservice/
> | \_pom.xml
> \_pom.xml

> {noformat}

> Each of these services is setup as a separate Jenkins job, and the maven dependencies are turned on so they all build in the appropriate order.
> Within the parent pom we have our <distributionManagement> section defined so we can run the mvn deploy goals to upload artifacts to our maven repository.
> Up until this point we have only been building SNAPSHOTS, for which the Nexus repository allows redeploying of artifacts.
> WHAT IS GOING WRONG:
> The other day we tried to build our first release version of some of the services, and the deployment into the Nexus maven repository failed on the "Deploy artifacts to Maven repository" task.
> Looking at the Console Output of the failed job, for some reason Jenkins is trying to deploy the parent POM a second time. Nexus refuses this, as it does not allow redeploying of release artifacts. Below is an excerpt from the output of one of those jobs:

> {quote}


> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------

> [INFO] Total time: 52.240s
> [INFO] Finished at: Thu Oct 06 14:55:37 GMT 2011
> [INFO] Final Memory: 63M/151M


> [INFO] ------------------------------------------------------------------------
> channel stopped
> Maven RedeployPublished use remote maven settings from : /opt/maven/conf/settings.xml

> ERROR: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400


> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
> at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:189)
> at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
> at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
> at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:987)
> at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
> at hudson.model.Run.run(Run.java:1428)
> at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:230)

> Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
> at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
> ... 11 more
> Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.luthresearch.savvyconnect:savvyconnect:pom:1.0.1 from/to com.luthresearch (dav:http://maven.luthresearch.net/nexus/content/repositories/releases/): Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
> at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
> ... 14 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://maven.luthresearch.net/nexus/content/repositories/releases//com/luthresearch/savvyconnect/savvyconnect/1.0.1/savvyconnect-1.0.1.pom. Return code is: 400
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:368)
> at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:280)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
> ... 15 more
> [INFO] Deployment failed after 0.27 sec
> Build step 'Deploy artifacts to Maven repository' changed build result to FAILURE
> Sending e-mails to: devs...@luthresearch.com
> Finished: FAILURE
> {quote}

> CONFIRMATION OF ISSUE:
> I logged into the build server, went to the project in the Jenkins workspace, deleted the existing release artifacts from the maven repository, and manually ran the mvn deploy goal. It succeeded in uploading all of the artifacts including the JARs.
> WORKAROUND:
> I disabled the "Post-Build Actions"->"Deploy artifacts to Maven repository."
> I then setup a "Post Steps"->"Invoke top-level Maven target" task with the Maven goal of "deploy". (I believe this functionality is provided by the Jenkins M2 Extra Steps Plugin. https://wiki.jenkins-ci.org/display/JENKINS/M2+Extra+Steps+Plugin)
> Using the post build step to execute the deploy goal succeeds in successfully uploading all of the artifacts.

--
This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa

scm_issue_link@java.net (JIRA)

unread,
Jun 29, 2012, 5:38:23 PM6/29/12
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: olivier lamy
Path:
maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java
http://jenkins-ci.org/commit/jenkins/1d2012b792fbd865953cf5c51ee95ddbe189758c
Log:
JENKINS-11248 Build fails on "Deploy artifacts to Maven repository" due to trying to upload parent POM twice for release artifacts.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

scm_issue_link@java.net (JIRA)

unread,
Jun 29, 2012, 5:38:23 PM6/29/12
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages