Good idea! Only problem is that "antrun" doesn't know about Ant 1.7...
(and I need a specific feature of a specific task which is available
only in Ant 1.7)
franz see wrote:
Good day,
How about using the antrun plugin instead? ( see [1] )
Cheers,
Franz
[1] http://maven.apache.org/plugins/maven-antrun-plugin/
Adrian Herscu-2 wrote:
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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]