Tagging sub-trunk directory when releasing with Maven (using SVN)

2.1k views Asked by At

Here is my SVN structure :

trunk /
 +- docs /
 +- dev /
     +- project-parent /
     +- project-war /
releases /

I would like the Maven release plugin to tag /trunk/dev/ to /releases/<release-version>

Here is my parent pom.xml

<build>
    <plugins>
        <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.1</version>
            <configuration>
                <tagBase>http://svn.mycompany.com/svn/project/releases</tagBase>
                <generateReleasePoms>false</generateReleasePoms>
                <autoVersionSubmodules>true</autoVersionSubmodules>
            </configuration>
        </plugin>
    </plugins>
</build>

<scm>
    <connection>scm:svn:http://svn.mycompany.com/svn/project/trunk/dev</connection>
    <developerConnection>scm:svn:http://svn.mycompany.com/svn/project/trunk/dev</developerConnection>
</scm>

The problem is that when I execute mvn release:prepare-with-pom, Maven tags /trunk to /releases/<release-version>.

Does someone know how to tag /trunk/dev instead ? Thanks !

2

There are 2 answers

0
Anthony O. On BEST ANSWER

Here is a workaround : set remoteTagging to false

    <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.1</version>
        <configuration>
            <tagBase>http://svn.mycompany.com/svn/project/releases</tagBase>
            <generateReleasePoms>false</generateReleasePoms>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <remoteTagging>false</remoteTagging>
        </configuration>
    </plugin>
0
Anthony O. On

It seems to be a bug ! I've created an issue here : http://jira.codehaus.org/browse/MRELEASE-642.