Maven Release Plugin
  1. Maven Release Plugin
  2. MRELEASE-511

release:prepare "Error parsing version, cannot determine next version: Unable to parse the version string" when running in batch mode.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-9
    • Fix Version/s: 2.4
    • Component/s: prepare
    • Labels:
      None
    • Environment:
      Win Xp Pro 64bit Java 1.6
    • Number of attachments :
      1

      Description

      When I try to run release:prepare in batch mode, I get the error below (can't parse version string) even though I supply the version number by argument. If I do the same thing with the same versions in interactive mode, it works fine.

      Here is the output:

      C:\workspaces\head\MyClient>mvn -B -e -Dresume=false -Dtag=PPX -DdevelopmentVersion=MYB_200909-SNAPSHOT -DreleaseVersion=PPX release:prepare release:perform
      + Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Unnamed - com.mycie:MyClient:jar:MYB_200909-SNAPSHOT
      [INFO]    task-segment: [release:prepare, release:perform] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      Downloading: http://myrepo.int.mycie.com:8081/artifactory/repo/org/apache/ws/security/wss4j/1.5.3/wss4j-1.5.3.pom
      [INFO] Unable to find resource 'org.apache.ws.security:wss4j:pom:1.5.3' in repository libs-releases (http://myrepo.int.mycie.com:8081/artifactory/repo)
      Downloading: http://myrepo.int.mycie.com/artifactory/libs-releases-local/org/apache/ws/security/wss4j/1.5.3/wss4j-1.5.3.pom
      [INFO] Unable to find resource 'org.apache.ws.security:wss4j:pom:1.5.3' in repository libs-releases-local (http://myrepo.int.mycie.com/artifactory/libs-releases-local)
      Downloading: http://repo1.maven.org/maven2/org/apache/ws/security/wss4j/1.5.3/wss4j-1.5.3.pom
      [INFO] Unable to find resource 'org.apache.ws.security:wss4j:pom:1.5.3' in repository central (http://repo1.maven.org/maven2)
      [INFO] [release:prepare {execution: default-cli}]
      [INFO] Verifying that there are no local modifications...
      [INFO] Executing: cmd.exe /X /C "cvs -z3 -f -t -d :pserver:usrbuild@mycvshost:/data/cvs/libcvs_web -n -q update -d"
      [INFO] Working directory: C:\workspaces\head\MyClient
      [INFO] Checking dependencies and plugins for snapshots ...
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error parsing version, cannot determine next version: Unable to parse the version string: "MYB_200909-SNAPSHOT"
      
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error parsing version, cannot determine next version: Unable to parse the version string: "MYB_200909-SNAPSHOT"
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
              at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
              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: Error parsing version, cannot determine next version: Unable to parse the version string: "MYB_200909-SNAPSHOT"
              at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:186)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
              ... 17 more
      Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Error parsing version, cannot determine next version: Unable to parse the version string: "MYB_200909-SNAPSHOT"
              at org.apache.maven.shared.release.phase.MapVersionsPhase.getNextVersion(MapVersionsPhase.java:227)
              at org.apache.maven.shared.release.phase.MapVersionsPhase.execute(MapVersionsPhase.java:140)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:196)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:133)
              at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:96)
              at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:182)
              ... 19 more
      Caused by: org.apache.maven.shared.release.versions.VersionParseException: Unable to parse the version string: "MYB_200909-SNAPSHOT"
              at org.apache.maven.shared.release.versions.DefaultVersionInfo.<init>(DefaultVersionInfo.java:171)
              at org.apache.maven.shared.release.phase.MapVersionsPhase.getNextVersion(MapVersionsPhase.java:177)
              ... 24 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4 seconds
      [INFO] Finished at: Wed Jan 06 16:10:47 EST 2010
      [INFO] Final Memory: 9M/18M
      [INFO] ------------------------------------------------------------------------
      

        Issue Links

          Activity

          Hide
          Michal Minicki added a comment -

          Great to hear! Thanks. Do you have any idea when it's going to be released?

          Show
          Michal Minicki added a comment - Great to hear! Thanks. Do you have any idea when it's going to be released?
          Hide
          Robert Scholte added a comment -

          No, currently I'm checking whether tests fail due to invalid assumption or due to invalid refactoring. Once I think this part is solved, I'll depoly a SNAPSHOT and will ask for review requests, since this is a very critical part of the plugin.
          There are more issues involved with dependencies (versions of deps with classifiers are ignored, systemPath is removed) which I'd like to include in this release.
          You'll get a message when I close this issue, which should give you the chance to verify the fixes.

          Show
          Robert Scholte added a comment - No, currently I'm checking whether tests fail due to invalid assumption or due to invalid refactoring. Once I think this part is solved, I'll depoly a SNAPSHOT and will ask for review requests, since this is a very critical part of the plugin. There are more issues involved with dependencies (versions of deps with classifiers are ignored, systemPath is removed) which I'd like to include in this release. You'll get a message when I close this issue, which should give you the chance to verify the fixes.
          Hide
          Robert Scholte added a comment -

          Part one is done in r1377520. I'll have to check the comments on this issue and maybe add additional tests before closing this issue.

          Show
          Robert Scholte added a comment - Part one is done in r1377520 . I'll have to check the comments on this issue and maybe add additional tests before closing this issue.
          Hide
          Robert Scholte added a comment -

          r1377810 contains a specifc unit test.
          @Ion Iovu: In general I don't we should trim prompt answers, so let's not do it here either.
          @Michal Minicki: please make a separate issue (improvement) for your request. This requires refactoring the DefaultVersionInfo. So it is not fixed yet.

          Show
          Robert Scholte added a comment - r1377810 contains a specifc unit test. @Ion Iovu: In general I don't we should trim prompt answers, so let's not do it here either. @Michal Minicki: please make a separate issue (improvement) for your request. This requires refactoring the DefaultVersionInfo . So it is not fixed yet.
          Hide
          Michal Minicki added a comment -

          @Robert - thanks for letting me know. I have created the issue as requested:

          https://jira.codehaus.org/browse/MRELEASE-793

          Show
          Michal Minicki added a comment - @Robert - thanks for letting me know. I have created the issue as requested: https://jira.codehaus.org/browse/MRELEASE-793

            People

            • Assignee:
              Robert Scholte
              Reporter:
              David Cloutier
            • Votes:
              15 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: