For servlet environments, only one dependency is required:
<dependency> <groupId>org.glassfish.jersey.containers</groupId> <artifactId>jersey-container-servlet</artifactId> <version>2.6</version> </dependency>
This will pull everything you need. If you are in a servlet 2.5 environment, you should use this instead
<dependency> <groupId>org.glassfish.jersey.containers</groupId> <artifactId>jersey-container-servlet-core</artifactId> <version>2.6</version> </dependency>
More information about 2.5 servlet can be seen here.
Alternatively, you can create a project from the Maven archetype, as shown here
UPDATE
As a note, the significance of using Jersey 2.6 is that the latest version supports Java 6. If this is not a requirement for you, I would recommend using the latest version .
source share