I'd like to know how I can do the following :
- I have two test classes, say test1 and test2
- I want to run test1 using glassfish-embedded and test2 using jboss-remote (5.1 if that's important).
I think I have the configuration done, with two containers in the arquillian.xml and the maven dependencies, but of course I had to activate both profiles for gf and jboss by default (otherwise, one of the tests fail).
But it fails :
Caused by: java.lang.IllegalStateException: Multiple service implementations found for interface org.jboss.arquillian.container.spi.client.container.DeployableContainer. org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer, org.jboss.arquillian.container.jbossas.remote_5_1.JBossASRemoteContainer
That seems to be another one of these dynamic instanciations that cause so much pain because of classpath issues...
You can't run Arquillian with multiple different containers on classpath, and Maven can only run with a single classpath.
So you'll have to setup multiple sub modules in maven, or execute maven multiple times with different profiles activated.