Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-523

ReleaseUtil throws "java.lang.StringIndexOutOfBoundsException: String index out of range: -1"

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0
    • None
    • prepare
    • None
    • Windows XP, Maven 2.2.1

    Description

      Hello,

      i have an issue using the maven release plugin 2.0, previous versions did not have this issue.

      In a multimodule project, release:prepare exits with the attached stack trace.

      After a litte debugging, i found out that in ReleaseUtil, line 188
      String dir = FileUtils.normalize( p.getBasedir().getPath().replace( '
      ', '/' ) );
      returns "c:\..." for the parent module, but "C:\..." for the first submodule.

      So in line 202
      basedir = StringUtils.getCommonPrefix( new String[]

      {dir, basedir}

      );
      results in an empty String, which leads to the exception in line 206.

      I will try to compose a simple example as soon as possible.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            brett Brett Porter
            watzmann Ulrich Hofstötter
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment