Details
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
Issue Links
- is duplicated by
-
MRELEASE-523
ReleaseUtil throws "java.lang.StringIndexOutOfBoundsException: String index out of range: -1"
-
-
SCM-547
Release on Windows, of a multi-module project, using msysgit, throws a StringIndexOutOfBoundsException
-
I found that the problem was triggered by msysgit (mingw) setting the current working directory to c:\foo rather than C:\foo, and that launching mvn from cmd instead of msysgit made the problem disappear. That said, if your patch solves it, great stuff.