You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vincent Siveton (JIRA)" <ji...@codehaus.org> on 2008/07/28 18:30:26 UTC

[jira] Commented: (MANT-46) mvn ant:ant throws a StringIndexOutOfBoundsException

    [ http://jira.codehaus.org/browse/MANT-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=143370#action_143370 ] 

Vincent Siveton commented on MANT-46:
-------------------------------------

Could you add a test case?

> mvn ant:ant throws a StringIndexOutOfBoundsException
> ----------------------------------------------------
>
>                 Key: MANT-46
>                 URL: http://jira.codehaus.org/browse/MANT-46
>             Project: Maven 2.x Ant Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Emmanuel Bourg
>
> I'm trying to generate a Ant build from the Maven 2 POM of Commons CLI but I get a StringIndexOutOfBoundsException. I don't know what this is supposed to mean.
> Here is the trace:
> {noformat}
> [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-ant-plugin:2.1:ant' -->
> [DEBUG]   (f) localRepository = [local] -> file://C:\Documents and Settings\Smanux\.m2\repository
> [DEBUG]   (f) overwrite = true
> [DEBUG]   (f) project = MavenProject: commons-cli:commons-cli:1.2-SNAPSHOT @ C:\dev\jakarta\cli\pom.xml
> [DEBUG]   (f) remoteRepositories = [[apache.snapshots] -> http://people.apache.org/repo/m2-snapshot-repository, [central] -> http://repo1.maven.org/maven2]
> [DEBUG]   (f) settings = org.apache.maven.settings.Settings@1e2befa
> [DEBUG] -- end configuration --
> [INFO] [ant:ant]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] String index out of range: -1
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1768)
>         at java.lang.String.substring(String.java:1735)
>         at org.apache.maven.wagon.PathUtils.toRelative(PathUtils.java:434)
>         at org.apache.maven.plugin.ant.AntBuildWriter.writeProperties(AntBuildWriter.java:464)
>         at org.apache.maven.plugin.ant.AntBuildWriter.writeGeneratedBuildXml(AntBuildWriter.java:266)
>         at org.apache.maven.plugin.ant.AntBuildWriter.writeBuildXmls(AntBuildWriter.java:113)
>         at org.apache.maven.plugin.ant.AntMojo.execute(AntMojo.java:112)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> {noformat}

-- 
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