Arquillian Jacoco Glassfish
hss3 Jan 25, 2013 8:59 AMHello
As far as i understood the other discussions here the maven configuration below should create me a jacoco.exec, but it does not.
I'm just wondering if i make a misstake somewhere or if the arquillian-jacoco extension doesn't work with glassfish.
Maven pom
<dependencies> ... <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-glassfish-embedded-3.1</artifactId> <version>1.0.0.CR3</version> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.main.extras</groupId> <artifactId>glassfish-embedded-all</artifactId> <version>3.1.2</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-jacoco</artifactId> <version>1.0.0.Alpha5</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jacoco</groupId> <artifactId>org.jacoco.core</artifactId> <version>0.6.0.201210061924</version> <scope>test</scope> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.0.3.Final</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement>
Arquillian.xml
<?xml version="1.0" encoding="UTF-8"?> <arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> <container qualifier="glassfish-embedded" default="true"> <configuration> <property name="resourcesXml"> src/test/resources/embedded-glassfish/glassfish-resources.xml </property> <property name="bindHttpPort">9000</property> </configuration> </container> </arquillian>
TestClass
@RunWith(Arquillian.class) public class KeyManagerTest { public KeyManagerTest() { } @Deployment public static JavaArchive createDeployment() { JavaArchive ja = ShrinkWrap.create(JavaArchive.class) .addPackage(KeyManager.class.getPackage()) .addAsManifestResource("test-persistence.xml", "persistence.xml") .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); return ja; } ... }