You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ulrich Hofstötter (JIRA)" <ji...@codehaus.org> on 2010/02/16 10:40:55 UTC

[jira] Commented: (MRELEASE-523) ReleaseUtil throws "java.lang.StringIndexOutOfBoundsException: String index out of range: -1"

    [ http://jira.codehaus.org/browse/MRELEASE-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210292#action_210292 ] 

Ulrich Hofstötter commented on MRELEASE-523:
--------------------------------------------

PS: i use jdk 1.6.0_17

> ReleaseUtil throws "java.lang.StringIndexOutOfBoundsException: String index out of range: -1"
> ---------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-523
>                 URL: http://jira.codehaus.org/browse/MRELEASE-523
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>          Components: prepare
>    Affects Versions: 2.0
>         Environment: Windows XP, Maven 2.2.1
>            Reporter: Ulrich Hofstötter
>         Attachments: log.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira