[buildnumber plugin, mercurial] Error when merged two heads in workspace
without commit
---------------------------------------------------------------------------------------
Key: MOJO-1645
URL: http://jira.codehaus.org/browse/MOJO-1645
Project: Mojo
Issue Type: Bug
Components: buildnumber
Affects Versions: buildnumber-maven-plugin-1.0-beta-4
Environment: Ubuntu 10.04 x64, maven 3.0.2
Reporter: Wujek
Priority: Minor
The configuration looks like this:
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<id>define-changeset</id>
<phase>initialize</phase>
<goals>
<goal>hgchangeset</goal>
</goals>
</execution>
</executions>
When the workspace has two merged heads, the plugin fails with the following
error message:
[ERROR] Failed to execute goal
org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:hgchangeset
(define-changeset) on project XXX: Execution define-changeset of goal
org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:hgchangeset failed: For
input string: "1500+1505" -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:hgchangeset
(define-changeset) on project XXX: Execution define-changeset of goal
org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:hgchangeset failed: For
input string: "1500+1505"
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
define-changeset of goal
org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:hgchangeset failed: For
input string: "1500+1505"
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:116)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.NumberFormatException: For input string: "1500+1505"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at
org.codehaus.mojo.build.HgChangeSetMojo.getRevision(HgChangeSetMojo.java:145)
at
org.codehaus.mojo.build.HgChangeSetMojo.execute(HgChangeSetMojo.java:88)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
... 20 more
The input string that fails has two local revision numbers that corresponds to
the two merged heads. When I commit the merge, all works, so there is a
workaround. The error message is very vague, though, and I think this could
work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email