Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Develop Eclipse MicroProfile applications on Red Hat JBoss Enterprise Application Platform XP 2.0

January 12, 2021
Emmanuel Hugonnet
Related topics:
JavaContainersDevOpsMicroservices

Share:

    This article shows you how to install Red Hat JBoss Enterprise Application Platform (JBoss EAP) XP 2.0.0 GA with support for Eclipse MicroProfile. Once you've enabled Eclipse MicroProfile, you will be able to use its quickstart examples to start developing your own MicroProfile applications with Red Hat CodeReady Studio. In this demonstration, you'll learn two ways to build and run the MicroProfile Config quickstart application.

    Installing JBoss EAP XP 2.0.0 GA

    To install JBoss EAP XP 2.0.0 GA:

    1. Download the following software from the product download page:
      • JBoss EAP XP 2.0.0 GA manager
      • JBoss EAP 7.3.4 GA patch
      • JBoss EAP XP 2.0.0 GA patch
    2. Apply the JBoss EAP 7.3.4 GA patch:
      $ patch apply /DOWNLOAD/PATH/jboss-eap-7.3.4-patch.zip
      
    3. Set up the JBoss EAP XP manager:
      $ java -jar jboss-eap-xp-2.0.0.GA-manager.jar setup --jboss-home=/INSTALL_PATH/jboss-eap-7.3
      
    4. Apply the JBoss EAP XP 2.0 patch using the following management command:
      $ java -jar jboss-eap-xp-2.0.0.GA-manager.jar patch-apply --jboss-home=/INSTALL_PATH/jboss-eap-7.3 --patch=/DOWNLOAD/PATH/jboss-eap-xp-2.0.0.GA-patch.zip
      

    Configuring CodeReady Studio

    To enable Eclipse MicroProfile support on JBoss EAP, we first need to register a runtime server for our newly installed JBoss EAP XP 2.0.0 instance. For this, we will create a new JBoss EAP 7.3 server called Red Hat JBoss EAP 7.3 XP 2.0.

    The server will use a new JBoss EAP 7.3 XP 2.0 runtime that points to the runtime that we've just installed. The JBoss EAP 7.3 XP 2.0 runtime uses the standalone-microprofile.xml configuration file.

    Select or enter the following configurations in the Define a New Server dialog, as shown in Figure 1:

    • Select the server type Red Hat JBoss Enterprise Application Platform 7.3.
    • Set the server’s hostname to localhost.
    • Enter Red Hat JBoss EAP 7.3 XP 2.0 as the server name.
    • Click Next.
    New Server dialog box with the specified options selected
    Figure 1: Define your new server.
    Figure 1: Define your new server.

    The next screen invites you to create a new server adapter. Keep the defaults and select Create new runtime to continue, as shown in Figure 2.

    New Server dialog box for configuring the JBoss Runtime
    Figure 2: Configure your new server.
    Figure 2: Select 'Create new runtime' to continue.

    In the next dialog, you will configure your new runtime server. Enter the configurations shown in Figure 3:

    • Set the home directory if you don’t want to use the default setting.
    • Make sure your execution environment is set to JavaSE-1.8 (but you can use JavaSE-11).
    • Change the settings for the server base directory and configuration file if you don’t want the defaults.
    • Click Finish.
    dialog box showing an overview of the server's settings
    Figure 3: Set environment variables from the server Overview dialog box.
    Figure 3: Configure the server runtime.

    Before we can run the MicroProfile quickstarts (see Figure 5), we need to set the environment variables on our runtime. Navigate to the Red Hat JBoss EAP 7.3 XP 2.0 Server Overview dialog and click Open launch configuration. You will see the option to set the environment variables, as shown in Figure 4.

    • Set JAEGER_REPORTER_LOG_SPANS to true.
    • Set JAEGER_SAMPLER_PARAM to 1.
    • Set JAEGER_SAMPLER_TYPE to const.
    dialog box showing the newly created environment variables
    Figure 4: Configure your runtime’s environment variables.
    Figure 4: Configure your runtime’s environment variables.

    Running the Eclipse MicroProfile quickstarts

    The Eclipse MicroProfile quickstarts offer the following examples, which you can run and test on your installed server:

    • Eclipse MicroProfile Config
    • Eclipse MicroProfile Fault-tolerance
    • Eclipse MicroProfile Health
    • Eclipse MicroProfile JWT
    • Eclipse MicroProfile Metrics
    • Eclipse MicroProfile OpenAPI
    • Eclipse MicroProfile OpenTracing
    • Eclipse MicroProfile REST Client

    To turn on the quickstarts, open your project explorer, then select and import the quickstart-parent pom.xml. You will see the list of quickstarts shown in Figure 5.

    Project Explorer with quickstart-parent selected.
    Figure 5: Import quickstart-parent to turn on quickstarts.
    Figure 5: Importing the quickstart parent turns on quickstarts.

    Running the Eclipse MicroProfile Config quickstart

    There are two ways to run the Eclipse MicroProfile Config application: A bare-metal installation of JBoss EAP XP Server or a bootable JAR application. I'll show you how to do both.

    Bare-metal installation

    If you are installing microprofile-config on bare metal, do the following:

    1. Right-click on the microprofile-config file.
    2. Select Run As.
    3. Left-click 1 Run on Server.

    This configuration, shown in Figure 6, starts the server with the microprofile-config application deployed.

    Runningthe microprofile-config project on local server
    Figure 6: Run `microprofile-config` on bare metal installation.
    Figure 6: A bare-metal installation.

    Install the application as a bootable JAR

    Instead of running your application on a bare-metal installation of JBoss EAP XP server, you can now package a JBoss EAP XP server and Eclipse MicroProfile application inside a bootable JAR. You can then run the application on a JBoss EAP XP bare-metal platform.

    For demonstration purposes, we've defined a Maven project for microprofile-config. The project includes the following bootable-jar profile:

        ----
          <profile>
              <id>bootable-jar</id>
              <build>
                  <plugins>
                      <plugin>
                          <groupId>org.wildfly.plugins</groupId>
                          <artifactId>wildfly-jar-maven-plugin</artifactId>
                          <configuration>
                              <feature-pack-location>org.jboss.eap:wildfly-galleon-pack:${version.server.bootable-jar}</feature-pack-location>
                              <layers>
                                  <layer>jaxrs-server</layer>
                                  <layer>microprofile-platform</layer>
                              </layers>
                          </configuration>
                          <executions>
                              <execution>
                                  <goals>
                                      <goal>package</goal>
                                  </goals>
                              </execution>
                          </executions>
                      </plugin>
                  </plugins>
              </build>
          </profile>
    ----
    

    As you can see, we have selected the jaxrs-server and the microprofile-plateform layers to construct a slim version of the JBoss EAP XP server, which encapsulates our application. All you need to do is select the correct profile, as shown in Figure 7:

    1. Right-click on the pom.xml.
    2. Navigate to Maven and choose Select Maven Profiles.
    3. Check bootable-jar.
    Dialog to select the apache Maven profile to use
    Figure 7: Select the Apache Maven Profile.
    Figure 7: Select the Apache Maven profile.

    Next, we need to build the bootable JAR using Apache Maven. Right-click on the pom.xml. Then, go into the Run As menu, and select 9 Maven install. Figure 8 shows these selections.

    Building the bootable jar using Apache Maven
    Figure 8: Build the bootable jar.
    Figure 8: Build the bootable JAR.

    Once the bootable JAR is built, we need to run our application from CodeReady Studio. We will create a new Apache Maven run configuration for this purpose. As shown in Figure 9, right-click on the pom.xml and navigate to the Run As menu, then select 5 Maven build. Set org.wildfly.plugins:wildfly-jar-maven-plugin:run as the goal and rename the execution to microprofile-config bootable run, then click Run.

    Running te bootable jar using Apache Maven
    Figure 9: Run the bootable jar.
    Figure 9: Run the bootable JAR.

    When the server starts, the application will be available as the root context, at http://localhost:8080/config/value.

    Shutting down the server

    Closing or terminating the terminal will not stop the running server, so we need another run configuration to shut down the server. The easiest approach is to copy the run configuration we've just created, rename it microprofile-config bootable shutdown, and use the goal org.wildfly.plugins:wildfly-jar-maven-plugin:shutdown, as shown in Figure 10.

    How to shutdown the server
    Figure 10: Shutdown the bootable jar.
    Figure 10: Create a new run configuration to shut down the server.

    Conclusion

    This article showed you how to install JBoss Enterprise Application Platform XP 2.0.0 GA with Eclipse MicroProfile support. I then showed you two ways to configure and run a MicroProfile Config quickstart project using Red Hat CodeReady Studio.

    Last updated: January 11, 2021

    Recent Posts

    • How to build a Model-as-a-Service platform

    • How Quarkus works with OpenTelemetry on OpenShift

    • Our top 10 articles of 2025 (so far)

    • The benefits of auto-merging GitHub and GitLab repositories

    • Supercharging AI isolation: microVMs with RamaLama & libkrun

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue