Book Image

RESTful Java Web Services, Second Edition

Book Image

RESTful Java Web Services, Second Edition

Overview of this book

Table of Contents (17 chapters)
RESTful Java Web Services Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Specifying dependencies for Jersey


Let us start our discussions on Jersey with a baby step. If you want to use any Jersey-specific feature in an application, then you will have to add a dependency to the appropriate Jersey libraries. For instance, to use a Jersey configuration class such as org.glassfish.jersey.server.ResourceConfig in your application, you need to depend on the jersey-container-servlet jar. If the consuming application uses Maven for building the source, then specifying a dependency to the jersey-container-servlet jar in the Project Object Model (POM) file may look like the following:

<dependency>
    <groupId>org.glassfish.jersey.containers</groupId>
  
  <!-- module -->
    <artifactId>jersey-container-servlet</artifactId>

  <!—2.17: latest release version -->
    <version>2.17</version>
    
    <!-- container(GlassFish) provides dependency
         for this example -->
    <scope>provided</scope&gt...