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.

Maven

<plugin>
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin</artifactId>
    <configuration>
        <provisioning-dir>${jboss.home}</provisioning-dir>
        <galleon-options>
            <jboss-fork-embedded>true</jboss-fork-embedded>
            <jboss-maven-dist/>
        </galleon-options>
        <feature-packs>
            <feature-pack>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-galleon-pack</artifactId>
                <inherit-configs>false</inherit-configs>
                <included-configs>
                    <config>
                        <model>standalone</model>
                        <name>standalone.xml</name>
                    </config>
                </included-configs>
            </feature-pack>
        </feature-packs>
        <channels>
            <channel>
                <manifest>
                    <groupId>org.wildfly</groupId>
                    <artifactId>wildfly</artifactId>
                </manifest>
            </channel>
            <!-- Not required, but will get you the latest version of RESTEasy -->
            <channel>
                <manifest>
                    <groupId>dev.resteasy.channels</groupId>
                    <artifactId>resteasy-6.2</artifactId>
                </manifest>
            </channel>
            <channel>
                <manifest>
                    <groupId>dev.resteasy.channels</groupId>
                    <artifactId>resteasy-microprofile-3.0</artifactId>
                </manifest>
            </channel>
        </channels>
        <layers>
            <layer>cdi</layer>
            <layer>jaxrs-server</layer>
            <layer>microprofile-config</layer>
        </layers>
    </configuration>
    <executions>
        <execution>
            <id>server-provisioning</id>
            <goals>
                <goal>provision</goal>
            </goals>
        </execution>
    </executions>
</plugin>