I had this problem with the test classpath. The only one that is used in
ant is the compile classpath. See
jira:http://jira.codehaus.org/browse/MNG-1504
Here is an example from my ant file that works for the classpath:
<project name="Kodo Enhance" default="test">
<path id="local.class.path">
<pathelement location="./target/test-classes"/>
<pathelement location="./target/classes"/>
<path refid="maven.test.classpath"/>
</path>
<target name="test">
<delete dir="target/testdbs"/>
<taskdef resource="testngtasks" classpathref="local.class.path"/>
<testng classpathref="local.class.path"
outputDir="./target/testng-output"
sourcedir="./src/test/java"
haltOnfailure="true">
<xmlfileset dir="./target/test-classes" includes="testng.xml"/>
</testng>
</target>
</project>
-----Original Message-----
From: Koschorek D., DP ITS, RV, DA, extern
[mailto:[EMAIL PROTECTED]
Sent: Thursday, December 08, 2005 3:59 AM
To: [email protected]
Subject: [m2] problem with maven-antrun-plugin
I can't access the "maven.plugin.classpath" or any other injected path
in my ant buildfile using the maven-antrun-plugin.
Here is the section from my pom.xml:
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<tasks>
<ant antfile="test.xml" inheritAll="true"
inheritRefs="true"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
...(some dependencies I need in my build script)
</dependencies>
</plugin>
...
How can I access in my ant script the "maven.plugin.classpath" or any
other predefined path/property?
>From the docs I understand "maven.plugin.classpath" will be injected as
path reference.
- When I try to access this path using
<property name="myPath" refid="maven.plugin.classpath"/>
I get the error message:
Reference maven.plugin.classpath not found.
- When I try to access "maven.plugin.classpath" as property
<echo message="myPath=${maven.plugin.classpath}"/>
I get the excpected result:
[echo] myPath=${maven.plugin.classpath}
Where is my mistake?
Thanks,
Dirk
---------------------------------------------------------------------
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]