使用Maven释放时标记子主目录(使用SVN)

时间:2011-01-31 21:32:16

标签: svn tags maven release trunk

这是我的SVN结构:

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

我希望Maven发布插件将/trunk/dev/标记为/releases/<release-version>

这是我的父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>

问题在于,当我执行mvn release:prepare-with-pom时,Maven将/trunk标记为/releases/<release-version>

有人知道如何标记/trunk/dev吗?谢谢!

2 个答案:

答案 0 :(得分:2)

以下是解决方法:将remoteTagging设置为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>

答案 1 :(得分:0)

这似乎是一个错误!我在这里创建了一个问题:http://jira.codehaus.org/browse/MRELEASE-642