Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titleProject dependencies for the glassfish container
collapsetrue
<!-- Pax Exam -->
<dependency>
    <groupId>org.ops4j.pax.exam</groupId>
    <artifactId>pax-exam-container-glassfish</artifactId>
    <version>${exam.version}</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.ops4j.pax.exam</groupId>
    <artifactId>pax-exam-junit4</artifactId>
    <version>${exam.version}</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.ops4j.pax.exam</groupId>
    <artifactId>pax-exam-servlet-bridge</artifactId>
    <version>${exam.version}</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.ops4j.pax.exam</groupId>
    <artifactId>pax-exam-cdi</artifactId>
    <version>${exam.version}</version>
    <scope>test</scope>
</dependency>

<!-- OSGi runtime dependencies -->
<dependency>
    <groupId>org.ops4j.pax.exam</groupId>
    <artifactId>pax-exam-link-assembly</artifactId>
    <version>${exam.version}</version>
    <scope>test</scope>
</dependency>

<!-- protocol handlers -->
<dependency>
    <groupId>org.ops4j.pax.url</groupId>
    <artifactId>pax-url-link</artifactId>
    <version>${url.version}</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.ops4j.pax.url</groupId>
    <artifactId>pax-url-aether</artifactId>
    <version>${url.version}</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.ops4j.pax.url</groupId>
    <artifactId>pax-url-classpath</artifactId>
    <version>${url.version}</version>
    <scope>test</scope>
</dependency>

<!-- OSGi framework -->
<dependency>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>org.eclipse.osgi</artifactId>
    <version>3.6.2.R36x_v20110210</version>
    <scope>test</scope>
</dependency>

<!-- Java EE APIs -->
<dependency>
    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-atinject_1.0_spec</artifactId>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-jpa_2.0_spec</artifactId>
    <scope>provided</scope>
</dependency>

<dependency>
    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-ejb_3.1_spec</artifactId>
    <scope>provided</scope>
</dependency>

<!-- Logging -->
<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-core</artifactId>
    <version>0.9.29</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>0.9.29</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>jul-to-slf4j</artifactId>
    <scope>test</scope>
</dependency>

The GlassFish Container downloads and install a GlassFish 3.1.2 server or uses an existing one to deploy and run your tests.

In addition, you need pax-exam-junit4 as a driver to run your tests, pax-exam-servlet-bridge for driver-probe communication and pax-exam-cdi to provide dependency injection for your tests.

pax-url-aether is only required if you use the mvn: protocol or if you want the container to download GlassFish.

The subset of Java EE APIs depends on your application and your tests. We recommend using the Geronimo API artifacts instead of the official javax:javaee-api:6.0, since the latter contains mutilated byte code which causes exception when this artifact is used at runtime.

Finally, there is a group of logging artifacts, redirecting all log output both from Pax Exam and from GlassFish to logback via SLF4J.