[ 
http://jira.codehaus.org/browse/MANTRUN-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_119615
 ] 

Kohsuke Kawaguchi commented on MANTRUN-68:
------------------------------------------

When I tried to use Ant 1.7.0 with Maven 2 in an environment similar to 
maven-antrun-plugin, I get the following error when Ant tries to load a 
resource from a jar file, whose path name includes whitespace. 

It appears that ClassLoaders from ClassWorlds return file URL that contains 
whitespace instead of escaping it to %20, and Ant 1.7 doesn't like this.

{noformat}
ava.lang.IllegalArgumentException
        at java.net.URI.create(URI.java:842)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
        at 
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
        at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
        at org.apache.tools.ant.Project.setAntLib(Project.java:313)
        at org.apache.tools.ant.Project.initProperties(Project.java:309)
        at org.apache.tools.ant.Project.init(Project.java:295)
        at 
org.jvnet.maven.plugin.antrun.components.AntTargetConverter.processConfiguration(AntTargetConverter.java:110)
        at 
org.jvnet.maven.plugin.antrun.components.AntTargetConverter.fromConfiguration(AntTargetConverter.java:80)
        at 
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
        at 
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
        at 
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
        at 
org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1147)
        at 
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:614)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.net.URISyntaxException: Illegal character in path at 
index 18: file:/C:/Documents and Settings/tjquinn/.m2/repositor
y/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
        at java.net.URI$Parser.fail(URI.java:2809)
        at java.net.URI$Parser.checkChars(URI.java:2982)
        at java.net.URI$Parser.parseHierarchical(URI.java:3066)
        at java.net.URI$Parser.parse(URI.java:3014)
        at java.net.URI.<init>(URI.java:578)
        at java.net.URI.create(URI.java:840)
        ... 35 more
{noformat}

> Use ant-1.7.0
> -------------
>
>                 Key: MANTRUN-68
>                 URL: http://jira.codehaus.org/browse/MANTRUN-68
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.2
>         Environment: xp, linux
>            Reporter: Dan Tran
>         Attachments: MANTRUN-68-maven-antrun-plugin.patch
>
>
> with out this upgrade, i will need to <exec> ant 1.7.0 to use its new 
> features like abily to do delete,move, etc using filelist

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

        

Reply via email to