This page shows an example of a pom.xml that can be used when using TesgNG for testing.
Note: i have used it for ejb3 components, testing it using jboss microcontainer.
As you will notice, in the pom some of the dependencies are listed with <system> scope; They refer to
microcontainer libraries that i have extracted from rc9 version of microcontainer.
Please , if you have any troubles mail me back at mmistroni@gmail.com and i will try to help you out.
Hth
marco
<?xml version="1.0"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>ejbJ2ME</groupId>
<artifactId>ejbJ2ME</artifactId>
<name>ejbJ2ME</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>MicroEdition</groupId>
<artifactId>project</artifactId>
<version>1.0</version>
</parent>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>iso-8859-1</encoding>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<url>http://cvs.apache.org/maven-snapshot-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.snapshots</id>
<url>http://cvs.apache.org/maven-snapshot-repository</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.1</version>
<classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>j2meCore</groupId>
<artifactId>J2MECore</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>microcontainer</groupId>
<artifactId>hibernate-all</artifactId>
<version>rc9</version>
<scope>system</scope>
<systemPath>$
\lib\hibernate-all-rc9.jar</systemPath>
</dependency>
<dependency>
<groupId>microcontainer</groupId>
<artifactId>jboss-ejb3-all</artifactId>
<version>rc9</version>
<scope>system</scope>
<systemPath>$
</dependency>
<dependency>
<groupId>microcontainer</groupId>
<artifactId>jcainflow</artifactId>
<version>rc9</version>
<scope>system</scope>
<systemPath>$
\lib\jcainflow-rc9.jar</systemPath>
</dependency>
<dependency>
<groupId>microcontainer</groupId>
<artifactId>thirdparty-all</artifactId>
<version>rc9</version>
<scope>system</scope>
<systemPath>$
</dependency>
<dependency>
<groupId>microcontainer</groupId>
<artifactId>jms-ra</artifactId>
<version>rc9</version>
<scope>system</scope>
<systemPath>$
\lib\jms-ra-rc9.jar</systemPath>
</dependency>
<dependency>
<groupId>microcontainer</groupId>
<artifactId>ehcache</artifactId>
<version>1.2</version>
<scope>system</scope>
<systemPath>$
</dependency>
<dependency>
<groupId>dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
