如何使用 BitBucket+Git+Maven 发布
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15233935/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I release with BitBucket+Git+Maven
提问by DarVar
I have specified the following SCM tags in my pom.
However when I do a maven release:prepare
the tag created has a version 1.0-SNAPSHOT instead of 1.0
我在 pom.xml 中指定了以下 SCM 标签。但是,当我执行 Maven 时release:prepare
,创建的标签的版本是 1.0-SNAPSHOT 而不是 1.0
Any ideas?
有任何想法吗?
<scm>
<connection>scm:git:https://<username>@bitbucket.org/<username>/<repo>.git</connection>
<developerConnection>scm:git:https://<username>@bitbucket.org/<username>/<repo>.git</developerConnection>
<url>https://bitbucket.org/<username>/<project></url>
</scm>
回答by jens
Ideally you would use SSH to authenticate when doing the release. In that case you would use the following configuration:
理想情况下,您将在发布时使用 SSH 进行身份验证。在这种情况下,您将使用以下配置:
<scm>
<connection>scm:git:ssh://[email protected]/<username>/<repo>.git</connection>
<developerConnection>scm:git:ssh://[email protected]/<username>/<repo>.git</developerConnection>
<url>https://bitbucket.org/<username>/<repo>.git</url>
</scm>
You can also take a look at this example.
你也可以看看这个例子。