[ http://jira.codehaus.org/browse/MNG-473?page=all ]
Brett Porter updated MNG-473: ----------------------------- Fix Version: 2.0-alpha-3 > m2 fails if user.home contains $ character > ------------------------------------------ > > Key: MNG-473 > URL: http://jira.codehaus.org/browse/MNG-473 > Project: Maven 2 > Type: Bug > Components: maven-core > Versions: 2.0-alpha-1 > Environment: Windows XP > Reporter: Max Muermann > Assignee: John Casey > Fix For: 2.0-alpha-3 > > > If the user.home path contains the $ character at the end, the string > replacement in > org.apache.maven.settings.DefaultMavenSettingsBuilder.getSettingsFile() fails > with a StringIndexOutOfBoundsException: > java.lang.StringIndexOutOfBoundsException: String index out of range: 22 > at java.lang.String.charAt(String.java:558) > at java.util.regex.Matcher.appendReplacement(Matcher.java:704) > at java.util.regex.Matcher.replaceAll(Matcher.java:806) > at java.lang.String.replaceAll(String.java:2000) > at > org.apache.maven.settings.DefaultMavenSettingsBuilder.getSettingsFile(DefaultMavenSettingsBuilder.java:124) > ... > If the $ character occurs not at the end of the path, an > IllegalArgumentException: Illegal Group Reference is thrown. > proposed fix: > add > userHome = userHome.replaceAll("\\$", "\\\\\\$"); > to the getSettingsFile() before > path = path.replaceAll("\\$\\{user.home\\}", userHome); > This results in $ characters being properly escaped. -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]