Dependencies

An application depending on Jersey requires that it in turn includes the set of jars that Jersey depends on.

Jersey has a pluggable component architecture for the HTTP container of an application, the configuration of the HTTP container, and the Java types used for entities of HTTP requests/responses. So the set of jars required to be include in the class path can be different for each application.

Jersey's runtime dependences are categorized into the following:

All jar files explicitly referenced below are present in the Jersey distribution.

Core

When using Java SE (5 or 6) or Java EE 5 the minimum set of required jars are:

jersey.jar, jsr311-api.jar, asm-3.1.jar

Specifically the asm-3.1.jar dependency is required when either of the following com.sun.ws.rest.api.core.ResourceConfig implementations are utilized:

By default Jersey will utilize the ClasspathResourceConfig if an alternative is not specified. If an alternative is specified that does not depend on asm-3.1.jar then it is no longer necessary to include asm-3.1.jar in the minimum set of required jars.

Container

Grizzly HTTP Web server

Deploying an application using the Grizzly HTTP Web server requires:

grizzly-http-webserver-1.7.2.jar

Light weight HTTP server

Deploying an application using the light weight HTTP server with Java SE 5 requires:

http.jar

Deploying an application using the light weight HTTP server with Java SE 6 requires no additional jars.

JAX-WS provider

Deploying an application using a JAX-WS provider with Java SE 5 or 6 or Java EE 5 requires the JAX-WS reference implementation version 2.1.x or higher with the following jars:

jaxws-rt.jar, jaxws-api.jar, jsr181-api.jar, jsr250-api.jar, saaj-api.jar, saaj-impl.jar, jsr173_api.jar, sjsxp.jar, resolver.jar, jaxb-api.jar, jaxb-impl.jar, activation.jar, stax-ex.jar, streambuffer.jar, stax-utils.jar

Servlet

Deploying an application on a servlet container requires a deployment dependency with that container.

Using servlet

com.sun.ws.rest.spi.container.servlet.ServletContainer
in a non-EE 5 servlet container requires the following jars:

jsr250-api.jar

Using servlet

com.sun.ws.rest.impl.container.servlet.ServletAdaptor
in a non-EE 5 servlet container requires the following jars:

jsr250-api.jar, persistence-api-1.0.jar

Entity

JAXB elements

XML serialization support of Java types that are JAXB elements with Java SE 5 or 6 or Java EE 4 or 5 requires the JAXB reference implementation version 2.1.x or higher with the following jars:

jaxb-impl.jar, jaxb-api.jar, activation.jar, jsr173_api.jar

JSON serialization support of JAXB elements when using the MIME media type "application/json" requires the additional jars:

jettison-1.0-RC1.jar

Atom

The use of the Java types com.sun.syndication.feed.atom.Entry and com.sun.syndication.feed.atom.Feed requires ROME version 0.9 or higher with the following jars:

rome-0.9.jar, jdom-1.0.jar

JSON

The use of the Java types org.codehaus.jettison.json.JSONObject and org.codehaus.jettison.json.JSONArray requires Jettison version 1.0 RC1 or higher with the following jars:

jettison-1.0-RC1.jar

Mail

The use of the Java type javax.mail.internet.MimeMultipart with Java SE 5 or 6 requires Java Mail version 1.4 or higher with the following jars:

mail.jar, activation.jar

The use of the Java type javax.mail.internet.MimeMultipart with Java EE 5 requires no additional jars.

Activation

The use of the Java type javax.activation.DataSource with Java SE 5 requires Java Activation 1.0 or higher with the following jars:

activation.jar

Tools

By default WADL for resource classes is generated dynamically at runtime. WADL support requires the following jars:

jaxb-impl.jar, jaxb-api.jar, activation.jar, jsr173_api.jar

If the above jars are not present then WADL generation is disabled and a warning will be logged.

The WADL ant task requires the same set of jars as those for runtime WADL support.