How do I release with BitBucket+Git+Maven

时间:2021-08-24 16:27:21

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中指定了以下SCM标签。但是,当我执行maven版本时:准备创建的标记具有版本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>

1 个解决方案

#1


22  

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://git@bitbucket.org/<username>/<repo>.git</connection>
    <developerConnection>scm:git:ssh://git@bitbucket.org/<username>/<repo>.git</developerConnection>
    <url>https://bitbucket.org/<username>/<repo>.git</url>
</scm>  

You can also take a look at this example.

您还可以查看此示例。

#1


22  

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://git@bitbucket.org/<username>/<repo>.git</connection>
    <developerConnection>scm:git:ssh://git@bitbucket.org/<username>/<repo>.git</developerConnection>
    <url>https://bitbucket.org/<username>/<repo>.git</url>
</scm>  

You can also take a look at this example.

您还可以查看此示例。