1. Update pom.xml file with below
<scm>
<connection>scm:git:ssh://<User ID>@<Server Address>:<Port>/<Project Name></connection>
<url>scm:git:ssh://<User ID>@<Server Address>:<Port>/<Project Name></url>
<developerConnection>scm:git:ssh://<User ID>@<Server Address>:<Port>/<Project Name></developerConnection>
</scm>
2. Add Maven plugin in pom.xml file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</build>
3. Execute command
Command:
mvn release:clean release:prepare -Dtag=<New Tag> -DdevelopmentVersion=<development version> -DreleaseVersion=<Release Version>
Example:
mvn release:clean release:prepare -Dtag=steven -DdevelopmentVersion=3.8-SNAPSHOT -DreleaseVersion=3.9
developmentVersion:
Default version to use for new local working copy.
releaseVersion: Default version to use when preparing a release or a branch.