My versions:
- Maven 3.0.4
- Jenkins 1.499
- Nexus 2.2
- maven-release-plugin 3.2
- jdk 1.6
- AIX 6.1
settings.xml
<server>
<id>snapshots</id>
<username>deploy</username>
<password>pass123</password>
</server>
<server>
<id>releases</id>
<username>deploy</username>
<password>pass123</password>
</server>
I have a lot of builds running in Jenkins which use the maven deploy
plugin and upload artifacts to the Nexus repo. Since the same user is able to deploy snapshots we can eliminate user roles/permissions issue in Nexus. (I still gave admin role to this user for testing)
Company parent POM
<distributionManagement>
<repository>
<id>releases</id>
<url>http://myserver/repositories/releases</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://myserver/repositories/snapshots</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>
Project POM
<scm>
<connection>scm:svn:http://svnserver/tags/1.2.3</connection>
<developerConnection>scm:svn:http://svnserver/tags/1.2.3</developerConnection>
</scm>
I have confirmed the /target/checkout/
in the Jenkins workspace contains the latest POM. Also added <distributionManagement>
inside the project POM
Now when I run maven release plugin from within Jenkins using mvn release:perform
I am still getting this:
Deployment failed: repository element was not specified in the POM inside
distributionManagement element or in -DaltDeploymentRepository=id::layout
::url parameter
release:prepare
shows no errors- The SVN tag gets created as expected
- Then during deploy, it fails with the above error
- Like I mentioned, snapshot deployment happens frequently and without error, so settings.xml, distributionManagement and Nexus permissions all seem to be in order.
- I am able to access
http://myserver/repositories/releases
manually - I have checked with
mvn help:effective-pom
andmvn help:effective-settings
and things seem to be in order
Any ideas ?