I'm using the antrun plugin to enhance my kodo jdo class files, and run
testng from ant build files.  In these build files I know I have access to
maven.dependency.classpath, however this doesn't include any of the jars
that are in the test scope.  Is there any other class path reference I can
use?  I have tried maven.test.classpath, however that doesn't seem to work
any better than maven.dependency.classpath

Any ideas??

POM:
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <id>run-testng</id>
            <phase>test</phase>
            <configuration>
              <tasks>
                <ant antfile="run-testng.xml" inheritAll="true" inheritRefs
="true"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Ant Build file
<project name="TestNG" default="test">
  <property environment="environment"/>
  <property name="m2localrepo" value="${environment.M2_REPO}"/>
  <path id="local.class.path">
    <fileset dir="${m2localrepo}">
      <include name="**/*testng*.jar"/>
    </fileset>
    <pathelement location="./target/test-classes"/>
    <pathelement location="./target/classes"/>
    <path refid="maven.dependency.classpath"/>
  </path>
  <target name="test">
    <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>
___________________________________
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Outcomes Through Information Technology"
___________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to