== Maven and RESTEasy

JBoss's Maven Repository is at: https://repository.jboss.org/nexus/content/groups/public/. The RESTEasy dependencies
from this repository are synchronized to Maven Central. Note it may take up to a day for this synchronization to happen.

RESTEasy is modularized into multiple 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".

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. 

Declare the BOM file in the dependencyManagement section of the POM file like this.
Note that Maven version 3.9.0 or higher is required to process BOM files.

[source,xml,subs="attributes+"]
----
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-bom</artifactId>
            <version>{resteasy-version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
----

Declare the specific RESTEasy artifacts you require in the dependencies section of the POM file like this. 

[source,xml]
----
<dependencies>
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
    </dependency>
</dependencies>
----

It is possible to reference a RESTEasy artifact version not in the current BOM by specifying a version in the dependency itself. 

[source,xml,subs="attributes+"]
----
<dependencies>
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
        <version>{resteasy-version}<version>
    </dependency>
</dependencies>
----