简体   繁体   English

配置 maven-release-plugin 将版本更改推送到 git 存储库?

[英]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.使用 maven-release-plugin 发布工件时,对工件版本所做的更改是本地的,不会推送到远程 git 存储库。

The following is the configuration I used for the maven-release-plugin:以下是我用于 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.我做了一些研究,发现我需要添加以下依赖maven-scm-plugin ,但不确定如何将它与 maven 发布插件一起配置。

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现在pom.xml在运行mvn release:preparemvn release:perform后推送对 pom.xml 所做的更改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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