简体   繁体   中英

Configure maven-release-plugin to push version changes to git repository?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM