我刚刚开始使用 Maven 来标记、发布和汇总下一个开发周期的版本,大多数时候它的工作方式就像魅力一样。我喜欢。
但是,我想使用release:branch目标同时创建一个仅包含次要版本汇总的维护分支,并且当我将分支的版本指定为参数时,maven似乎没有选择它。为什么?
我已经尝试了 docs 和 -Dproject.rel.org.example:artifact= href="http://maven.apache.org/plugins/maven-release-plugin/examples/branch.html" rel="nofollow">示例。
我使用的maven版本是2.2.1,maven-release-plugin版本是2.1。
I've just started using maven for tagging, releasing and rolling up versions for the next development cycle and most of the time it works like charm. Me like.
However I would like to use the release:branch goal to at the same time create a maintenance branch with only a minor version rollup, and when I specify the version of the branch as an argument maven doesn't seem to pick it up. Why?
I've tried both with the -DreleaseVersion=<version>
option specified in the docs and the -Dproject.rel.org.example:artifact=<version>
used in the example.
The version of maven I'm using is 2.2.1 and the maven-release-plugin version is 2.1.
发布评论
评论(2)
事实证明 -DreleaseVersion 工作得很好,但是 pom 中的 svn 配置有多种方法会导致不同步,如果是这样,指定版本将不起作用。
As it turns out -DreleaseVersion works just fine, but there are several ways for the svn configs in the pom to end up out of sync and if it is, specifying version just won't work.
来自 http://maven.apache.org/ maven-release/maven-release-plugin/branch-mojo.html#releaseVersion
因此,对于 mvn release:branch 用例,您需要设置 releaseVersion 和 updateBranchVersions
例如
From http://maven.apache.org/maven-release/maven-release-plugin/branch-mojo.html#releaseVersion
Therefore for the mvn release:branch use-case you need to set both releaseVersion AND updateBranchVersions
e.g.