maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Herscu <bmf1...@fastmail.fm>
Subject Re: [m2] exec-maven-plugin fails because path containing spaces
Date Mon, 16 Apr 2007 19:41:42 GMT
Added
	<localRepository>C:\DOCUME~1\pm\M2639C~1\REPOSI~1</localRepository>

to the M2 install settings.xml.

But, this may require changes in other machines as well :-(

Phill Moran wrote:
> Surround them in quotes or use the dos short for. For instance "program files"
> == "progra~1" 
> 
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Adrian Herscu
> Sent: April 16, 2007 3:07 PM
> To: users@maven.apache.org
> Subject: [m2] exec-maven-plugin fails because path containing spaces
> 
> 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.jav
> a: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.jav
> a: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.jav
> a: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.jav
> a: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


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


Mime
View raw message