简体   繁体   English

Maven版本插件2.2.2不会推送到发行版管理

[英]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:preparemvn 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.

相关问题 Maven:发布插件在<distributionManagement>中看不到我的<repository> - Maven: release plugin doesn't see my <repository> in <distributionManagement> "maven 发布插件真的需要distributionManagement 元素吗?" - Is the distributionManagement element really needed with the maven release plugin? JGitFlow maven插件不会将release分支推送到远程 - JGitFlow maven plugin doesn't push release branch to remote Maven Android版本:执行DistributionManagement问题 - Maven android release:perform problem with distributionManagement Maven release-plugin不会更新LATEST版本 - Maven release-plugin doesn't update LATEST version git push 使用 Maven 发布插件失败 - git push fails using maven release plugin 无法执行目标 org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE:run - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE:run maven-surefire-plugin 在 SpringBoot 2.2.2.RELEASE 及更高版本中不起作用 - maven-surefire-plugin doesnot work in SpringBoot 2.2.2.RELEASE and above Grails版本插件Maven部署不会更新 <latest> 一致地在maven-metadata.xml中标记 - Grails Release Plugin Maven Deployment doesn't update <latest> tag in maven-metadata.xml consistently 如何使用 maven 发布插件将发布推送到 github? - How do I push a release to github with the maven release plugin?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM