Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-547

Release on Windows, of a multi-module project, using msysgit, throws a StringIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.3
    • None
    • None
    • Windows XP 32-bit, msysgit 1.6.5.1-preview20091022, maven 2.2.1

    Description

      Install msysgit with the default settings. Launch Git Bash.

      git clone http://github.com/rickyclarkson/maven-git-testcase.git

      cd maven-git-testcase

      mvn release:prepare

      The following is the output:

      [INFO] Scanning for projects...
      [INFO] Reactor build order:
      [INFO] Unnamed - org.test:maven-git-testcase-parent:pom:1.0-SNAPSHOT
      [INFO] Unnamed - org.test:maven-git-testcase-child:jar:1.0-SNAPSHOT
      [INFO] Searching repository for plugin with prefix: 'release'.
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Unnamed - org.test:maven-git-testcase-parent:pom:1.0-SNAPSHOT
      [INFO] task-segment: [release:prepare] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      [INFO] [release:prepare

      {execution: default-cli}

      ]
      [INFO] Verifying that there are no local modifications...
      [INFO] Executing: cmd.exe /X /C "git status"
      [INFO] Working directory: c:\Documents and Settings\Craig\maven-git-testcase
      [INFO] nothing added to commit but untracked files present (use "git add" to track)
      [INFO] Checking dependencies and plugins for snapshots ...
      What is the release version for "Unnamed - org.test:maven-git-testcase-parent:pom:1.0-SNAPSHOT"? (org.test:maven-git-testcase-parent) 1.0: :
      What is the release version for "Unnamed - org.test:maven-git-testcase-child:jar:1.0-SNAPSHOT"? (org.test:maven-git-testcase-child) 1.0: :
      What is SCM release tag or label for "Unnamed - org.test:maven-git-testcase-parent:pom:1.0-SNAPSHOT"? (org.test:maven-git-testcase-parent) maven-git-t
      estcase-parent-1.0: :
      What is the new development version for "Unnamed - org.test:maven-git-testcase-parent:pom:1.0-SNAPSHOT"? (org.test:maven-git-testcase-parent) 1.1-SNAP
      SHOT: :
      What is the new development version for "Unnamed - org.test:maven-git-testcase-child:jar:1.0-SNAPSHOT"? (org.test:maven-git-testcase-child) 1.1-SNAPSH
      OT: :
      [INFO] Transforming 'Unnamed - org.test:maven-git-testcase-parent:pom:1.0-SNAPSHOT'...
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] String index out of range: -1
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1937)
      at org.apache.maven.shared.release.util.ReleaseUtil.getCommonBasedir(ReleaseUtil.java:206)
      at org.apache.maven.shared.release.util.ReleaseUtil.getCommonBasedir(ReleaseUtil.java:177)
      at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transformDocument(AbstractRewritePomsPhase.java:303)
      at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transformProject(AbstractRewritePomsPhase.java:208)
      at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform(AbstractRewritePomsPhase.java:114)
      at org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute(AbstractRewritePomsPhase.java:97)
      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)
      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)
      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)
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 10 seconds
      [INFO] Finished at: Mon Apr 19 00:05:02 BST 2010
      [INFO] Final Memory: 10M/21M
      [INFO] ------------------------------------------------------------------------

      This problem appears to go away if I move to a directory without spaces in the name, e.g., c:\maven-git-testcase, use Linux, run mvn release:prepare from within IDEA, release a single-module project or use svn instead of git.

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              ricky_clarkson Ricky Clarkson
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: