[英]Maven: release plugin doesn't see my <repository> in <distributionManagement>
[英]Maven release plugin 2.2.2 doesn't push to distributionmanagement
我不得不将Maven版本插件从2.2.1版本更新到2.2.2,以解决一个错误,但是现在,在执行Maven版本时,新版本的文件没有上载到我的发行管理中。
我尝试了以下方法:
mvn release:prepare
和mvn release:perform
使用2.2.2版的发布插件执行:上传新的SNAPSHOT版本
mvn release:prepare
使用2.2.1版, mvn release:perform
与2.2.2版:上载新版本(这是我想要的)
因此,以某种方式通过mvn release:perform
使用发行版插件2.2.2 mvn release:perform
的设置会出错,但是我真的不明白为什么会这样。
更新:我快速浏览了target \\ checkout文件夹,其中有SNAPSHOT版本的pom-s。 因此,在release:prepare期间,将错误的版本移至检出。
更新#2:我已经将其范围缩小到与git相关的范围。 target \\ checkout文件夹的内容来自git checkout。 由于我也更新了scm-plugin的版本,因此它必须与此有关。
从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>
我正在使用Maven 2.2.1。
通过将maven-release-plugin更新到版本2.4解决了该问题。 在release:perform期间,它签出了快照版本,并将其推送到分发管理而不是构建版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.