How do I release with BitBucket+Git+Maven

DarVar picture DarVar · Mar 5, 2013 · Viewed 16.5k times · Source

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

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>

Answer

jens picture jens · Mar 11, 2013

Ideally you would use SSH to authenticate when doing the release. In that case you would use the following configuration:

<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.