Skip to content

resteasy/resteasy-microprofile

Repository files navigation

RESTEasy MicroProfile

The RESTEasy MicroProfile project contains implementations and utilities for the Eclipse MicroProfile.

Building

Building requires Maven and Java 11.

mvn clean install

Usage

The simplest way to use these dependencies is to import the BOM.

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jboss.resteasy.microprofile</groupId>
            <artifactId>resteasy-microprofile-bom</artifactId>
            <version>${version.org.jboss.resteasy.microprofile}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

RESTEasy MicroProfile Client

This is an implementation of the MicroProfile REST Client.

<dependency>
    <groupId>org.jboss.resteasy.microprofile</groupId>
    <artifactId>microprofile-rest-client</artifactId>
</dependency>

RESTEasy Config

This uses the MicroProfile Config to define some ConfigSource options.

The current sources for finding properties are:

  • ServletConfig

  • FilterConfig

  • ServletContext

<dependency>
    <groupId>org.jboss.resteasy.microprofile</groupId>
    <artifactId>microprofile-config</artifactId>
</dependency>

RESTEasy Context Propagation

This adds a context provider for RESTEasy which works with MicroProfile Context Propagation.

<dependency>
    <groupId>org.jboss.resteasy.microprofile</groupId>
    <artifactId>microprofile-context-propagation</artifactId>
</dependency>

Installation

WildFly

The MicroProfile REST Client implementation and MicroProfile Config sources are already provided in WildFly. If you’d like to upgrade or add all the modules to a provisioned WildFly server, you can use the Galleon tooling to do so.

Galleon CLI

galleon.sh install org.jboss.resteasy.microprofile:galleon-feature-pack:$VERSION

Maven

<plugin>
    <groupId>org.jboss.galleon</groupId>
    <artifactId>galleon-maven-plugin</artifactId>
    <configuration>
        <install-dir>${jboss.home}</install-dir>
        <record-state>false</record-state>
        <plugin-options>
            <jboss-maven-dist/>
            <jboss-fork-embedded>true</jboss-fork-embedded>
            <optional-packages>passive+</optional-packages>`
        </plugin-options>
        <feature-packs>
            <feature-pack>
                <groupId>org.jboss.resteasy.microprofile</groupId>
                <artifactId>galleon-feature-pack</artifactId>
                <version>${version.org.jboss.resteasy.microprofile}</version>
            </feature-pack>
        </feature-packs>
        <configurations>
            <config>
                <model>standalone</model>
                <name>standalone.xml</name>
                <layers>
                    <layer>cdi</layer>
                    <layer>jaxrs-server</layer>
                    <layer>microprofile-config</layer>
                </layers>
            </config>
        </configurations>
    </configuration>
    <executions>
        <execution>
            <id>server-provisioning</id>
            <goals>
                <goal>provision</goal>
            </goals>
        </execution>
    </executions>
</plugin>