Я хочу выпустить новую версию своего проекта с помощью Maven-Release-Plugin.
Я получаю следующую ошибку, хотя:
[INFO] Tagging release with the label softsmithy-lib-v0.1...
[INFO] EXECUTING: /bin/sh -c cd /var/lib/hudson/jobs/SoftSmithy-Utility-Library-Release && hg tag --message '[maven-release-plugin] copy for tag softsmithy-lib-v0.1' softsmithy-lib-v0.1
[ERROR]
EXECUTION FAILED
Execution of cmd : tag failed with exit code: 255.
Working directory was:
/var/lib/hudson/jobs/SoftSmithy-Utility-Library-Release
Your Hg installation seems to be valid and complete.
Hg version: 1.7.5 (OK)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error is occurred in the tag process: Exception while executing SCM command.
Error while executing command tag --message [maven-release-plugin] copy for tag softsmithy-lib-v0.1 softsmithy-lib-v0.1
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error is occurred in the tag process: Exception while executing SCM command.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error is occurred in the tag process: Exception while executing SCM command.
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:215)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:181)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: An error is occurred in the tag process: Exception while executing SCM command.
at org.apache.maven.shared.release.phase.ScmTagPhase.execute(ScmTagPhase.java:113)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:203)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:140)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:103)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:211)
... 20 more
Caused by: org.apache.maven.scm.ScmException: Exception while executing SCM command.
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:63)
at org.apache.maven.scm.provider.hg.HgScmProvider.tag(HgScmProvider.java:239)
at org.apache.maven.scm.provider.AbstractScmProvider.tag(AbstractScmProvider.java:706)
at org.apache.maven.shared.release.phase.ScmTagPhase.execute(ScmTagPhase.java:109)
... 24 more
Caused by: org.apache.maven.scm.ScmException: Error while executing command tag --message [maven-release-plugin] copy for tag softsmithy-lib-v0.1 softsmithy-lib-v0.1
at org.apache.maven.scm.provider.hg.command.tag.HgTagCommand.executeTagCommand(HgTagCommand.java:105)
at org.apache.maven.scm.command.tag.AbstractTagCommand.executeCommand(AbstractTagCommand.java:81)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
... 27 more
Я пытался запустить
/bin/sh -c cd /var/lib/hudson/jobs/SoftSmithy-Utility-Library-Release && hg tag --message '[maven-release-plugin] copy for tag softsmithy-lib-v0.1' softsmithy-lib-v0.1
и все работало нормально!
Есть идеи, что не так?
PS: Я заметил, что на следующем сайте: http://maven.apache.org/scm/matrix.html
упомянуто, что команда тега Mercurial не поддерживается, но она, кажется, выполняет команду (и затем терпит неудачу как-то).Как я могу использовать плагин Maven Release с Mercurial?
PPS: Это похоже только на многомодульные проекты.Один проект POM работает нормально.Я попытался -DpreparationGoals = "чистой установки", но это не помогло.