Links: Table of Contents | Single HTML

Chapter 2. Jersey Modules and Dependencies

Jersey is built, assembled and installed using Maven. Jersey is deployed to the Java.Net maven repository at the following location: http://maven.java.net/. The Jersey modules can be browsed at the following location: https://maven.java.net/content/repositories/releases/org/glassfish/jersey. Jars, Jar sources, Jar JavaDoc and samples are all available on the java.net maven repository.

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 so the set of jars required to be include in the class path can be different for each application.

All Jersey components are built using Java SE 6 compiler. It means, you will also need at least Java SE 6 to be able to compile and run your application.

Developers using maven are likely to find it easier to include and manage dependencies of their applications than developers using ant or other build technologies. This document will explain to both maven and non-maven developers how to depend on Jersey for their application. Ant developers are likely to find the Ant Tasks for Maven very useful.

The following table provides an overview of all Jersey modules and their dependencies with links to the respective binaries.

Table 2.1. Jersey modules and dependencies

ModuleDependenciesDescription
Core
jersey-server jersey-commons Base server functionality.
jersey-clientjersey-commonsBasic client functionality.
jersey-commons Common functionality shared by client and server.
Containers
.........

2.1. Sample Scenarios

2.1.1. Basic Server-Side Application

For a server side Jersey application you typically need to depend on jersey-server module to provide the basic functionality, then you may want to support JSON mapping and a standard JavaEE servlet container you would deploy your application to. So this would be the common set of dependencies for your project for this kind of scenario:

  • jersey-server
  • jersey-commons
  • ...