maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Herscu <bmf1...@fastmail.fm>
Subject [m2] exec-maven-plugin fails because path containing spaces
Date Mon, 16 Apr 2007 19:07:25 GMT
Hi all,

I am trying to run Ant 1.7 from within Maven 2 using the exec-maven-plugin.

       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
         <executions>
           <execution>
             <phase>process-test-resources</phase>
             <goals>
               <goal>java</goal>
             </goals>
           </execution>
         </executions>
         <configuration>
           <mainClass>org.apache.tools.ant.Main</mainClass>
           <workingDirectory>${basedir}</workingDirectory>
           <arguments>
             <argument>-buildfile</argument>
             <argument>${basedir}/mybuild.xml</argument>
           </arguments>
         </configuration>
       </plugin>

It seems that there is a problem with Windows paths containing spaces.
Anyone knows about a decent workaround?

Thanks,
Adrian.

P.S. The error log:[[


BUILD FAILED
java.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:585)
	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.apache.tools.ant.Main.runBuild(Main.java:663)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.Main.start(Main.java:161)
	at org.apache.tools.ant.Main.main(Main.java:250)
	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:585)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at 
index 18: file:/C:/Documents and 
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
	at java.net.URI$Parser.fail(URI.java:2816)
	at java.net.URI$Parser.checkChars(URI.java:2989)
	at java.net.URI$Parser.parseHierarchical(URI.java:3073)
	at java.net.URI$Parser.parse(URI.java:3021)
	at java.net.URI.<init>(URI.java:578)
	at java.net.URI.create(URI.java:840)
	... 20 more

Total time: 0 seconds
java.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:585)
	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.apache.tools.ant.Main.runBuild(Main.java:663)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.Main.start(Main.java:161)
	at org.apache.tools.ant.Main.main(Main.java:250)
	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:585)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at 
index 18: file:/C:/Documents and 
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
	at java.net.URI$Parser.fail(URI.java:2816)
	at java.net.URI$Parser.checkChars(URI.java:2989)
	at java.net.URI$Parser.parseHierarchical(URI.java:3073)
	at java.net.URI$Parser.parse(URI.java:3021)
	at java.net.URI.<init>(URI.java:578)
	at java.net.URI.create(URI.java:840)
	... 20 more


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message