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

CommonBasedir Calculation fails on windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • prepare
    • None
    • Patch

    Description

      The method getCommonBasedir in class org.apache.maven.shared.release.util.ReleaseUtil runs into the Exception:
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1

      ... while comparing pathes with small and capital lettes for Windows drives.

      e.g.: C:\WoRkInG\root\project1 has no common base dir with c:\working\root\project2
      but it should have c:\working\root as common base directory.

      A patch and a test for that bug is attached.
      I do have the problem with version 2.0 but I fixed it in trunk for now

      Regards Matthias

      Attachments

        1. patchfile.patch
          2 kB
          Matthias Vach

        Issue Links

          Activity

            People

              brett Brett Porter
              matthias.vach Matthias Vach
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: