Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven-release-plugin and maven 3.0.3

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.

like image 578
kkudi Avatar asked Jan 04 '12 11:01

kkudi


People also ask

What is Maven release plugin?

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.

Is Maven 3 backwards compatible?

Like advertised, maven 3 is backwards compatible with maven 2.

What is Maven Release perform?

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.

What is release prepare Maven?

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 .


1 Answers

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 ?

like image 69
Jean-Rémy Revy Avatar answered Sep 18 '22 17:09

Jean-Rémy Revy