-
1. Re: Error running TestNG integration test using JBDS
troy.sellers Nov 24, 2008 8:03 AM (in response to troy.sellers)Hi,
I have found a workaround, wouldn't call this a solution.
If you migrate the bootstrap folder (this was created with seam-gen) into your project.
Then update the pom.xml (we are using a single war deployment, we only have one pom)<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <additionalClasspathElements> <additionalClasspathElement>bootstrap</additionalClasspathElement> </additionalClasspathElements> <childDelegation>true</childDelegation> <useSystemClassLoader>true</useSystemClassLoader> </configuration> </plugin>
Add the necesarry dependencies
<dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.8</version> <scope>test</scope> <classifier>jdk15</classifier> </dependency> <dependency> <groupId>javassist</groupId> <artifactId>javassist</artifactId> <version>3.8.0.GA</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> <version>1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ejb</groupId> <artifactId>ejb-api</artifactId> <version>3.0</version> <scope>provided</scope> </dependency>
This allowed me to run a maven build with the TestNG setup.
I am pretty sure it is a nasty hack, but I couldn't figure out how to reference the -test project that is created by seam-gen. When I was running my tests from this project I was still getting the duplicate factory exception. I am guessing this was because I had a project dependency for SEAM and also was referencing the main project?.
Anyways... if anyone wanders past this post and would like to let me know where I might have been going wrong, would be appreciated.
Cheers,
Troy