我有一个多模块项目,其中聚合器位于项目的根目录中,父项位于子目录中,紧邻所有其他模块
pom.xml (aggregator, inherits from parent)
|---parent
|---module1 (inherits from parent)
|---module2 (inherits from parent)
我正在尝试使用maven-release-plugin-2.4.1
发布我的项目我运行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]
任何想法意味着什么以及如何解决它?据我所知,我正在遵循标准发布程序,唯一不同(但常见)的配置是聚合器和父poms的分离
答案 0 :(得分:2)
问题似乎是“循环”引用,其中聚合器从其聚合的其中一个pom继承。一旦我删除它,一切正常。
所以基本上有两个简单的选择,要么合并父代和聚合器,要么在聚合器中复制(或者只是移动)SCM信息,这样聚合器就不会从任何人继承