<chapter id="Maven_and_RESTEasy">
   <title>Maven and RESTEasy</title>
   <para>
JBoss's Maven Repository is at:
      https://repository.jboss.org/nexus/content/groups/public/
   </para>
   <para>

     RESTEasy is modularized into 20 plus components.  Each component is accessible as a Maven
     artifact.  As a convenience RESTEasy provides a BOM containing the complete set of components
     with the appropriate versions for the "stack".
   </para>
   <para>
     It is recommended to declare the BOM in your POM file, that way you will always
     be sure to get the correct version of the artifacts.  In addition, you will not need
     to declare the version of each RESTEasy artifact called out in the dependencies section.
   </para>
   <para>
     Declare the BOM file in the dependencyManagement section of the POM file like this.
     Note that Maven version 2.0.9 or higher is required to process BOM files.
   </para>
  <programlisting>
    <![CDATA[
    <dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-bom</artifactId>
          <version>${version.resteasy}</version>
          <type>pom</type>
          <scope>import</scope>
        </dependency>
      </dependencies>
    </dependencyManagement>
  ]]>
  </programlisting>
   <para>
     Declare the specific RESTEasy artifacts you require in the dependencies section of the
     POM file like this.
   </para>
  <programlisting>
    <![CDATA[
     <dependencies>
       <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-client</artifactId>
       </dependency>
        ....
   </dependencies>
  ]]>
  </programlisting>
   <para>
     It is possible to reference a RESTEasy artifact version not in the current BOM
     by specifying a version in the dependency itself.
   </para>
  <programlisting>
    <![CDATA[
     <dependencies>
       <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-client</artifactId>
          <version>${version.some.other}<version>
       </dependency>
        ....
   </dependencies>
  ]]>
  </programlisting>
   
</chapter>
