简体   繁体   English

Github从Maven-release-plugin发布

[英]Github release from maven-release-plugin

I have a multimodule project where the aggregator is in the root of the project and the parent is in a subdirectory, next to all the other modules 我有一个多模块项目,其中聚合器位于项目的根目录中,而父级位于子目录中,在所有其他模块旁边

pom.xml (aggregator, inherits from parent)
|---parent
|---module1 (inherits from parent)
|---module2 (inherits from parent)

i'm trying to release my project using maven-release-plugin-2.4.1 我正在尝试使用maven-release-plugin-2.4.1释放我的项目

I run mvn release:prepare -DdryRun=true and everything works fine, but if i run a real run, not dryRun then i get a problem at the end when trying to push the tag to github: 我运行mvn release:prepare -DdryRun=true ,一切正常,但是如果我运行真实运行,而不是dryRun,则在尝试将标签推到github时最终遇到问题:

...
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd "/home/hilikus/dev/Eclipse workspace/JRoboCom" && git add -- jrobocom-parent/pom.xml jrobocom-core/pom.xml jrobocom-simple-gui/pom.xml jrobocom-samples/pom.xml jrobocom-samples/legends/pom.xml jrobocom-samples/simple/pom.xml jrobocom-samples/simple/4Lunch/pom.xml jrobocom-samples/simple/black-jacks/pom.xml jrobocom-samples/simple/bank-jumper/pom.xml pom.xml
[INFO] Working directory: /home/hilikus/dev/Eclipse workspace/JRoboCom
[INFO] Executing: /bin/sh -c cd "/home/hilikus/dev/Eclipse workspace/JRoboCom" && git status
[INFO] Working directory: /home/hilikus/dev/Eclipse workspace/JRoboCom
[INFO] Executing: /bin/sh -c cd "/home/hilikus/dev/Eclipse workspace/JRoboCom" && git commit --verbose -F /tmp/maven-scm-646807004.commit jrobocom-parent/pom.xml jrobocom-core/pom.xml jrobocom-simple-gui/pom.xml jrobocom-samples/pom.xml jrobocom-samples/legends/pom.xml jrobocom-samples/simple/pom.xml jrobocom-samples/simple/4Lunch/pom.xml jrobocom-samples/simple/black-jacks/pom.xml jrobocom-samples/simple/bank-jumper/pom.xml pom.xml
[INFO] Working directory: /home/hilikus/dev/Eclipse workspace/JRoboCom
[INFO] Executing: /bin/sh -c cd "/home/hilikus/dev/Eclipse workspace/JRoboCom" && git symbolic-ref HEAD
[INFO] Working directory: /home/hilikus/dev/Eclipse workspace/JRoboCom
[INFO] Executing: /bin/sh -c cd "/home/hilikus/dev/Eclipse workspace/JRoboCom" && git push https://github.com/theHilikus/JRoboCom.git/jrobocom-aggregator master:master
[INFO] Working directory: /home/hilikus/dev/Eclipse workspace/JRoboCom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Parent POM ........................................ SKIPPED
...
[INFO] Bank-jumper ....................................... SKIPPED
[INFO] The overall aggregator ............................ FAILURE [3:30.447s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:32.658s
[INFO] Finished at: Tue Jul 23 22:31:43 EDT 2013
[INFO] Final Memory: 9M/44M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project jrobocom-aggregator: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] fatal: https://github.com/theHilikus/JRoboCom.git/jrobocom-aggregator/info/refs not found: did you run git update-server-info on the server?
[ERROR] -> [Help 1]

any ideas what this means and how to fix it? 任何想法这意味着什么以及如何解决? as far as i know, i'm following the standard release procedure, the only different (but common) configuration is the separation of the aggregator and the parent poms 据我所知,我遵循标准发布程序,唯一不同(但通用)的配置是聚合器和父poms的分离

The problem seemed to be the "circular" reference where the aggregator inherits from one of the poms that it is aggregating. 问题似乎是“圆形”引用,其中聚合器从正在聚合的poms之一继承。 As soon as I removed that, everything worked. 一旦我删除了它,一切就正常了。
So there are basically two simple choices, either merge the parent and the aggregator, or have the SCM info duplicated (or just moved) in the aggregator so that the aggregator doesn't inherit from anyone 因此,基本上有两个简单的选择,要么合并父级和聚合器,要么在聚合器中复制(或只是移动)SCM信息,以使聚合器不会从任何人那里继承

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

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