When releasing an artifact with maven-release-plugin, the changes made to the artifact version are local and not pushed to the remote git repository.
The following is the configuration I used for the maven-release-plugin:
<configuration>
<goals>pre-integration-test</goals>
<preparationGoals>package</preparationGoals>
<releaseProfiles>releases</releaseProfiles>
</configuration>
I did some research and found out I need to add the following dependency maven-scm-plugin
, but not sure how to configure it along with the maven release plugin.
I have solved the problem by adding the following dependency to the plugin dependencies:
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.11.2</version>
</dependency>
</dependencies>
Now maven pushes the changes made to the pom.xml
after running mvn release:prepare
and mvn release:perform