I'm using the maven release plugin to perform the following with maven-3.0.3
mvn release:prepare
Everything seems to be going fine except that when it creates the tag in SVN, it copies the previous version from the tags folder with the correct label. Any ideas why?
If I switch back to maven-2.2.1, the tagging is correct and the contents of the tagging are the expected ones.
With Maven 2.2.1:
[INFO] Tagging release with the label crcib-6.8.5...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file c:\DOCUME~1\markand\LOCALS~1\Temp\maven-scm-1593649573.commit . <url>/svn/repos/crcib/tags/crcib-6.8.5"
With Maven 3.0.3:
[INFO] Tagging release with the label crcib-6.8.5...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file c:\DOCUME~1\markand\LOCALS~1\Temp\maven-scm-2047728233.commit --revision 6331 <url>/svn/repos/crcib/tags/crcib-6.8.2 <url>/svn/repos/crcib/tags/crcib-6.8.5"
Any ideas why? Also, it seems that when using Maven 2, several artifacts are being downloaded before the tagging commences. This is not the case with Maven 3.
This plugin is used to release a project with Maven, saving a lot of repetitive, manual work. Releasing a project is made in two steps: prepare and perform. Note: Maven 3 users are encouraged to use at least Maven-3.0. 4 due to some settings related issues.
Like advertised, maven 3 is backwards compatible with maven 2.
release:perform will fork a new Maven instance to build the checked-out project. This new Maven instance will use the same system configuration and Maven profiles used by the one running the release:perform goal. After the release is complete, the release.
Description: Prepare for a release in SCM. Steps through several phases to ensure the POM is ready to be released and then prepares SCM to eventually contain a tagged version of the release and a record in the local copy of the parameters used. This can be followed by a call to release:perform .
Without your pom.xml, it is difficult to know what's the problem.
The most obvious misconfiguration is probably ins scm, as Wemu said; :
<scm>
<!-- Base URL of repository (trunk/tags/branches independant)-->
<url>scm:svn:http://svn.my.company.com/repository</url>
<!-- Current working url (NOT TAG ONE) -->
<connection>scm:svn:http://svn.my.company.com/repository/trunk/my-project</connection>
<!-- Current working url -->
<developerConnection>scm:svn:http://svn.my.company.com/repository/trunk/my-project</developerConnection>
</scm>
This is the version and how I use this plugin :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.2</version>
<configuration>
<tagBase>svn.my.company.com/repository/tags</tagBase>
</configuration>
</plugin>
When you'll use the maven release plugin, this will modify your scm configuration to point to tags. If it's really a maven 3 issue, i never noticed it.
Could you, please, post you pom.xml (and settings.xml) for further analysis ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With