Maven版本插件2.2.2不会推送到发行版管理 [英] Maven release plugin 2.2.2 doesn't push to distributionmanagement
问题描述
我不得不将Maven版本插件从2.2.1更新到2.2.2,以解决一个错误,但是现在,在执行Maven版本时,新版本的文件没有上载到我的发行管理。 / p>
我尝试了以下操作:
-
MVN版本:准备
&mvn release:perform
,带有2.2.2版的发行插件:上传新的SNAPSHOT版本 -
mvn版本:准备
(版本2.2.1),mvn版本:执行
版本2.2.2:上传新版本(这就是我想要的)
所以以某种方式由 mvn版本完成了设置:perform
与版本2.2.2的发行插件有误,但我真的不明白为什么会发生这种情况。
更新:我快速浏览了我的target\checkout文件夹,其中有SNAPSHOT版本的pom-s。
更新#2:我已经将其范围缩小到与git相关的范围。 target\checkout文件夹的内容来自git checkout。由于我还更新了scm-plugin的版本,因此它也必须与此有关。.
从pom.xml:
< plugin>
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-release-plugin< / artifactId>
< configuration>
< preparationGoals>全新安装< / 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> 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来解决。在发布期间:执行该操作,检出快照版本,并将其推送到分发管理而不是构建版本。
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.
I have tried the following:
mvn release:prepare
&mvn release:perform
with version 2.2.2 of the release-plugin: Uploads the new SNAPSHOT-versionmvn release:prepare
with version 2.2.1,mvn release:perform
with version 2.2.2: Uploads the new version (which is what i want)
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.
Update: I took a quick look in my target\checkout folder, and there the pom-s where for the SNAPSHOT-version. So the wrong version is moved to checkout during release:prepare.
Update #2: I've narrowed it down to something git-related. The contents of the target\checkout folder comes from a git checkout. Since I've updated the version of the scm-plugin as well it must have something to do with this..
From 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.
Solved it by updating the maven-release-plugin to version 2.4. During release:perform it checked out a snapshot version and pushed this to the distribution management instead of the built version.
这篇关于Maven版本插件2.2.2不会推送到发行版管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!