9

As a part of my project's configuration, I'm trying to checkout a specific tag out of a GitHub repository. Currently the plugin configuration is as follows:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-plugin</artifactId>
            <executions>
                <execution><!-- checkout the msgppack-rpc project -->
                    <id>msgpack-rpc-checkout</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>checkout</goal>
                    </goals>
                    <configuration>
                        <goals>checkout</goals>
                        <connectionUrl>scm:git:https://github.com/msgpack/msgpack-rpc.git</connectionUrl>
                        <tag>java-0.6.0</tag>
                        <checkoutDirectory>repoCode/msgpack-rpc</checkoutDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>

However, the "tag" element seems to be ignored by the Git SCM provider. I've also tried to put the tag directly in the URL, like e.g. so:

scm:git:https://github.com/msgpack/msgpack-rpc.git/refs/tags/java-0.6.0

Unfortunately, this, and other permutations of this format produce errors. I have no other ideas, and I've failed to find an example for this use case anywhere.

4

1 回答 1

4

结帐目标没有将元素<tag>列为参数。看起来您像这样指定标签信息:

<scmVersionType>tag</scmVersionType>
<scmVersion>java-0.6.0</scmVersion>
于 2012-04-24T16:21:31.970 回答