Chapter 2. Overview of JBoss EAP Maven plug-in


The following chapter describes the JBoss EAP Maven plug-in and the different ways in which you can provision JBoss EAP by using the plug-in.

2.1. About JBoss EAP Maven plug-in

The JBoss EAP Maven plug-in uses Galleon provisioning mechanism to provision a server with only the required capabilities to reduce the size and memory footprint of the server. The JBoss EAP Maven plug-in provisions the server and deploys the packaged application to the provisioned server during the Maven execution.

You can package the provisioned server, with the application deployed, in the following ways:

  • Provisioned server: The directory target/server contains a server and application.
  • Bootable jar: The server and the application are packaged as a Java Archive (JAR).

You can also choose whether to deploy the application in the provisioned server by configuring one of the supported goals:

package
Provision the server with the application deployed. Also, optionally execute JBoss EAP CLI script files to customize your server configuration. A CLI script includes a list of CLI commands for configuring the server. Additionally, you can add files into the server installation, such as a keystore file.
provision
Only provision the server. The provision goal does not deploy the application, and also does not execute JBoss EAP CLI script files.

JBoss EAP Maven plug-in syntax

The following snippet shows the basic syntax for configuring the JBoss EAP maven plug-in in the pom.xml configuration file.

<plugins>
  <plugin>
    <groupId>org.jboss.eap.plugins</groupId>
    <artifactId>eap-maven-plugin</artifactId>
    <version>${MavenPluginVersion}</version>             
1

    <configuration>
      <channels>
        <channel>
          <manifest>
            <groupId>org.jboss.eap.channels</groupId>    
2

            <artifactId>${channel_id}</artifactId>
          </manifest>
        </channel>
      </channels>
      <feature-packs>
        <feature-pack>
          <location>${featurepack_location}</location>   
3

        </feature-pack>
      </feature-packs>
      <layers>
        <layer>${layer_1_to_include}</layer>             
4

        ...
        <layer>${layer_N_to_include}</layer>
      </layers>
      <bootable-jar>${true_or_false}</bootable-jar>      
5

    </configuration>
    <executions>
      <execution>
        <goals>
          <goal>${provision_or_package}</goal>           
6

        </goals>
      </execution>
    </executions>
  </plugin>
</plugins>
1
See the Red Hat Maven repository for more information on JBoss EAP Maven plugin releases: org/jboss/eap/plugins/eap-maven-plugin/.
2
This specifies the JBoss EAP 8.1 Beta channel in which the JBoss EAP server artifacts are defined. For example, eap-8.1.
3
You can retrieve the version of this feature-pack from the JBoss EAP channel. The Galleon feature-pack includes Galleon layers such as cloud-server for provisioning trimmed JBoss EAP servers.
4
Define the layers from the configured feature-packs to include in the provisioned server.
5
Set this to true to package the provisioned server as a bootable JAR, otherwise set to false or don’t include the element.
6
Use the provision goal to provision a server without the application deployed. Use the package goal to provision the server with the application deployed, apply custom configured CLI scripts, and copy custom content into the server installation.

For a complete list of configuration options, see JBoss EAP Maven plug-in configuration parameters.

2.2. About the bootable JAR

A bootable JAR contains a server, a packaged application, and the runtime required to launch the server.

A bootable JAR is like a standard JBoss EAP server in the following ways:

  • It supports JBoss EAP common management CLI commands.
  • It can be managed using the JBoss EAP management console.

The following limitations exist when packaging a server in a bootable JAR:

  • CLI management operations that require a server restart are not supported.
  • The server cannot be restarted in the admin-only mode, which is a mode that starts services related to server administration.
  • If you shut down the server, updates that you applied to the server are lost.
  • Bootable jar is not supported on OpenShift Container Platform when using the source-to-image (S2I) workflow. For information about S2I workflow, see Building application images using source-to-image in OpenShift.

Additionally, you can provision a hollow bootable JAR. This JAR contains only the server, so you can reuse the server to run a different application.

2.3. The Galleon provisioning file

Provisioning files are XML files with the name provisioning.xml that you can store in the galleon subdirectory. Using them is an alternative to configuring feature-packs and layers in the JBoss EAP Maven plug-in. You can configure provisioning.xml file to fine-tune the provisioning process.

The following code demonstrates a provisioning file content that you can use to provision JBoss EAP server based on the cloud-server layer.

Note

The JBoss EAP feature-packs don’t have versions, versions are retrieved from the configured channel in the Maven plug-in.

<?xml version="1.0" ?>
<installation xmlns="urn:jboss:galleon:provisioning:3.0">
    <feature-pack location="org.jboss.eap:wildfly-ee-galleon-pack:">
1

        <default-configs inherit="false"/>
2

        <packages inherit="false"/>
3

    </feature-pack>
    <feature-pack location="org.jboss.eap.cloud:eap-cloud-galleon-pack:
">
4

        <default-configs inherit="false"/>
        <packages inherit="false"/>
    </feature-pack>
    <config model="standalone" name="standalone.xml">
5

        <layers>
            <include name="cloud-server"/>
        </layers>
    </config>
    <options>
6

        <option name="optional-packages" value="passive+"/>
    </options>
</installation>
1
This element instructs the provisioning process to provision the JBoss EAP feature-pack retrieved from the JBoss EAP channel.
2
This element instructs the provisioning process to exclude default configurations. You can retrieve default configurations in JBoss EAP server installation, such as standalone.xml and standalone-ha.xml. When you are provisioning JBoss EAP server from the JBoss EAP Maven plugin, generate a single server configuration based on the configured Galleon users. Setting the option to false prevents the generation of any additional server configurations. Setting inherit=true is not supported for both default-configs and packages.
3
This element instructs the provisioning process to exclude default packages.
4
This element instructs the provisioning process to provision the JBoss EAP cloud feature-pack. The child elements instruct the process to exclude default configurations and default packages.
5
This element instructs the provisioning process to create a custom standalone configuration. The configuration includes the cloud-server base layer defined in the JBoss EAP feature-pack and tuned for OpenShift by the JBoss EAP cloud feature-pack.
6
This element instructs the provisioning process to optimize provisioning of JBoss EAP modules.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top