开发者

Does maven-release-plugin push tags to remote Git repository?

When using the maven-release-plugin with Git, mvn release:prepare happily tags the release in the local repository. I'd expect mvn release:perform to push the tags to the remote repository, but this doesn't seem to happen.

Am I mistaken?

If not, is t开发者_如何转开发here an option to enable pushing release tags to the remote repository?


For me, release-prepare seems to be pushing three times:

  1. After committing the POM updated to the new release version, it's running git push with no arguments, to push that commit.
  2. After tagging, it's running git push origin <tagname>, which is what should push the tag.
  3. After committing the POM updated to the new snapshot version, it's running git push with no arguments again.

Given that it's explicitly specifying origin for the tag push, it may only successfully push the tags if your git-remote alias is actually called origin. To see what yours are called, run git remote -v.

Note also that git push without arguments may default to something other than origin, depending on your repository config - i.e. it may have been trying to push commits to one place and tags to another. See here for where those defaults come from: http://www.kernel.org/pub/software/scm/git/docs/git-push.html#REMOTES

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜