Java Reference
In-Depth Information
Maven
We'll start the configuration changes for Maven by adding the Arquillian dependencies to
pom.xml. The first one you add tells Maven which version of Arquillian you want to get:
:<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.0.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
Next, you want to get the Arquillian project that integrates Arquillian with JUnit. This al-
lows you to utilize the Maven test lifecycle to run the integration tests as if they were unit
tests. But be aware. Just because you're using JUnit doesn't mean you'll be writing unit
tests. JUnit will simply be a technology to basically bootstrap Arquillian and run the integ-
ration tests:
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
Finally, you want to get the Arquillian wrappers over GlassFish because you'll be using the
GlassFish implementation of the embedded
EJBContainer
for the integration tests:
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-embedded-3.1</artifactId>
<version>1.0.0.CR3</version>
</dependency>
We've covered the Arquillian dependencies in pom.xml. Two additional dependencies we
need to look at are the dependencies to get the EJBs from the
chapter15-ejb
project
(which you need to test) and
glassfish-embedded-all
for GlassFish. These two de-
pendencies are the same as the
chapter15-ejb-embedded-test
project discussed
in the previous section: