[英]Maven release plugin 2.2.2 doesn't push to distributionmanagement
I had to update the maven release plugin from version 2.2.1 to 2.2.2 to get around a bug, but now, when doing a maven release, the files for the new version are not uploaded to my distribution management. 我不得不将Maven版本插件从2.2.1版本更新到2.2.2,以解决一个错误,但是现在,在执行Maven版本时,新版本的文件没有上载到我的发行管理中。
I have tried the following: 我尝试了以下方法:
mvn release:prepare
& mvn release:perform
with version 2.2.2 of the release-plugin: Uploads the new SNAPSHOT-version mvn release:prepare
和mvn release:perform
使用2.2.2版的发布插件执行:上传新的SNAPSHOT版本
mvn release:prepare
with version 2.2.1, mvn release:perform
with version 2.2.2: Uploads the new version (which is what i want) mvn release:prepare
使用2.2.1版, mvn release:perform
与2.2.2版:上载新版本(这是我想要的)
So somehow the setup done by mvn release:perform
with version 2.2.2 of the release plugin gets things wrong, but I really can't see why this happens. 因此,以某种方式通过
mvn release:perform
使用发行版插件2.2.2 mvn release:perform
的设置会出错,但是我真的不明白为什么会这样。
Update: I took a quick look in my target\\checkout folder, and there the pom-s where for the SNAPSHOT-version. 更新:我快速浏览了target \\ checkout文件夹,其中有SNAPSHOT版本的pom-s。 So the wrong version is moved to checkout during release:prepare.
因此,在release:prepare期间,将错误的版本移至检出。
Update #2: I've narrowed it down to something git-related. 更新#2:我已经将其范围缩小到与git相关的范围。 The contents of the target\\checkout folder comes from a git checkout.
target \\ checkout文件夹的内容来自git checkout。 Since I've updated the version of the scm-plugin as well it must have something to do with this..
由于我也更新了scm-plugin的版本,因此它必须与此有关。
From pom.xml: 从pom.xml中:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>clean install</preparationGoals>
<pushChanges>false</pushChanges>
</configuration>
<version>2.2.2</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
</plugin>
[...]
<distributionManagement>
<repository>
<id>nexus-releases</id>
<url>http://repository/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>nexus-snapshots</id>
<url>http://repository/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
I'm using maven 2.2.1. 我正在使用Maven 2.2.1。
Solved it by updating the maven-release-plugin to version 2.4. 通过将maven-release-plugin更新到版本2.4解决了该问题。 During release:perform it checked out a snapshot version and pushed this to the distribution management instead of the built version.
在release:perform期间,它签出了快照版本,并将其推送到分发管理而不是构建版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.