0% found this document useful (0 votes)
32 views

WildFly Bootable JAR Documentation

This document provides documentation on WildFly bootable JARs. It discusses how to compose a custom WildFly server using Galleon layers, specifying the WildFly version and layers to include or exclude. It also covers configuring the server during packaging or at runtime, and developing with the bootable JAR in different modes.

Uploaded by

h2oo2h
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

WildFly Bootable JAR Documentation

This document provides documentation on WildFly bootable JARs. It discusses how to compose a custom WildFly server using Galleon layers, specifying the WildFly version and layers to include or exclude. It also covers configuring the server during packaging or at runtime, and developing with the bootable JAR in different modes.

Uploaded by

h2oo2h
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

2024. 03. 10.

10:12 WildFly Bootable JAR Documentation

WildFly Bootable JAR Documentation


Jean-Francois Denise
Version 10.0.0.Final, 2023-07-20T17:19:32Z

https://docs.wildfly.org/bootablejar/ 1/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Table of Contents
1. Introduction
2. Examples
2.1. Downloading the examples
3. Composing custom server with Galleon layers
3.1. Specifying the WildFly server version to use
3.2. Specifying the set of Galleon layers to use
3.3. Excluding Galleon layers
4. URL context path of deployed application
5. Hollow bootable JAR
6. Configuring the server during packaging
6.1. WildFly CLI execution during packaging
7. Configuring the server for cloud execution
7.1. OpenShift Deployment using Eclipse JKube
7.2. WildFly OpenShift Operator
8. Configuring the server at runtime
9. Other Maven plugin goals
10. Development mode (dev mode)
10.1. Development mode with source watching
10.2. Remote development mode with source watching
10.3. Development mode with repackaging
11. Enabling debug
11.1. Enable Debug for Openshift
12. Advanced usages
12.1. Provisioning a slim bootable JAR
12.2. Provisioning with WildFly Channels
12.3. Upgrading a bootable JAR
13. Troubleshooting
13.1. Out of Memory error when building
14. Maven plugin
14.1. Goals overview
14.2. dev
14.3. dev-watch
14.4. help
14.5. package
14.6. run
14.7. shutdown
14.8. start

https://docs.wildfly.org/bootablejar/ 2/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

© 2019 The original authors.

https://docs.wildfly.org/bootablejar/ 3/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

1. Introduction
The WildFly JAR Maven plugin is aimed to build a bootable JAR for WildFly (starting version 20.0.0.Final). A WildFly bootable JAR
contains both the server and your packaged application (a JAR, an EAR or a WAR). Once the application has been built and
packaged as a bootable JAR, you can start the application using the following command:

java -jar target/myapp-bootable.jar

The --help argument displays the list of the supported arguments:

java -jar target/myapp-bootable.jar --help

A WildFly bootable JAR behaves in a way that is similar to a WildFly server installed on file system:

It supports the main standalone server startup arguments.


It can be administered/monitored using WildFly CLI.

Some limitations exist:

The server can’t be re-started automatically during a shutdown. The bootable JAR process will exit without restarting.
Management model changes (eg: using WildFly CLI) are not persisted. Once the server is killed, management updates are lost.
Server can’t be started in admin mode.

NB: When started, the bootable JAR installs a WildFly server in the TEMP directory. The bootable JAR displayed traces contain the
actual path to this transient installation. This installation is deleted when the bootable JAR process exits.

https://docs.wildfly.org/bootablejar/ 4/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

2. Examples
The examples directory (https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples) contains Maven example
projects that highlight various usages of the WildFly bootable JAR. Build and run these projects to familiarize yourself with the
Maven plugin. A good example to start with is the jaxrs
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/jaxrs) example.

Some of these examples are targeting deployment of the bootable JAR in OpenShift. For example: microprofile-config
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/microprofile-config), postgresql
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/postgresql) and jkube
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/jkube).

Deployment inside a JIB (https://github.com/GoogleContainerTools/jib) container is covered by jib


(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/jib) example and examples/jib-* projects.

2.1. Downloading the examples


Clone the wildfly-jar-maven-plugin repository: git clone -b 10.0.0.Final https://github.com/wildfly-extras/wildfly-jar-maven-plugin
cd wildfly-jar-maven-plugin/examples
Each example directory contains a README file with instructions on how to build and run the example.

https://docs.wildfly.org/bootablejar/ 5/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

3. Composing custom server with Galleon layers


When building a bootable JAR you have the ability to select the set of WildFly Galleon layers
(https://docs.wildfly.org/29.0/Bootable_Guide.html#wildfly_layers) you want to see present in the bootable JAR. Selecting a subset of server
features has an impact on the server xml configuration and the set of installed JBoss modules. By selecting the subset required by
your application you will reduce the JAR size, server configuration content and memory footprint.

You are not limited to the WildFly Galleon layers (https://docs.wildfly.org/29.0/Bootable_Guide.html#wildfly_layers), you can combine
other third parties Galleon layers compatible with WildFly (eg: WildFly database drivers and datasources layers
(https://github.com/wildfly-extras/wildfly-datasources-galleon-pack)). The example postgresql
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/postgresql) shows how to create a cloud-server with
support for postgresql database.

3.1. Specifying the WildFly server version to use


You need to provide a reference to the WildFly Galleon producer that contains the layers you want to use. This can be done in 3
ways.

3.1.1. Providing WildFly Galleon feature-pack location


That is the simplest way to reference a WildFly server. The configuration element feature-pack-location contains this information.

Some examples:

To provision a WildFly 29.0 server:

XML
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#29.0.0.0.Final</feature-pack-location>

To provision the latest WildFly server:

XML
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)</feature-pack-location>

3.1.2. Providing a list of Galleon feature-packs


In some cases you will want to combine Galleon layers from multiple sources. In this case you will use the feature-packs
configuration element that contains a list of feature-packs. For example, to provision Galleon layers from WildFly 29.0 and
WildFly extras datasources you would provide:

XML
<feature-packs>
<feature-pack>
<location>wildfly@maven(org.jboss.universe:community-universe)#29.0.0.0.Final</location>
</feature-pack>
<feature-pack>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-datasources-galleon-pack</artifactId>
<version>1.0.6.Final</version>
</feature-pack>
</feature-packs>

NB: The list of feature-packs can’t be used in conjunction with feature-pack-location element.

3.1.3. Providing a Galleon provisioning.xml file


For advanced use cases you can fully control the Galleon provisioning by defining the file galleon/provisioning.xml. galleon
directory must be located in the root directory of your Maven project. A custom file location can be set thanks to the provisioning-
file plugin option.

https://docs.wildfly.org/bootablejar/ 6/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

3.2. Specifying the set of Galleon layers to use


If no Galleon layers are provided, a microprofile standalone server (with a configuration identical to the default standalone-
microprofile.xml configuration) is provisioned and packaged in the bootable JAR. In order to reduce the server content to your
application needs, use the layers configuration element.

For example, to provision a server containing jaxrs and management support:

XML
<layers>
<layer>jaxrs</layer>
<layer>management</layer>
</layers>

3.3. Excluding Galleon layers


In order to exclude layers that are not strictly required, use the excluded-layers configuration element.

For example, jaxrs layer (that depends on web-server layer) brings the deployment scanner. The deployment scanner being an
optional dependency of the web-server layer it can be excluded:

XML
<excluded-layers>
<layer>deployment-scanner</layer>
</excluded-layers>

https://docs.wildfly.org/bootablejar/ 7/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

4. URL context path of deployed application


By default, a WAR deployed inside a bootable JAR is located in the root context ('/'). This can be changed to the WAR file name by
using the context-root configuration element.

https://docs.wildfly.org/bootablejar/ 8/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

5. Hollow bootable JAR


If your use-case requires it, you can create a bootable JAR that doesn’t contain a deployment. It can be handy to re-use a bootable
JAR artifact with various deployments. Use the hollow-jar configuration element to create an hollow JAR.

The example hollow-jar (https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/hollow-jar) shows how to build


an hollow JAR.

When starting an hollow JAR you can provide the path to a deployment you want to see deployed inside the server. For example:

java -jar target/jaxrs-hollow-server-bootable.jar --deployment=path/to/my-jaxrs-app.war

NB: In order to have your deployment be located in the root context, name the WAR file ROOT.war.

https://docs.wildfly.org/bootablejar/ 9/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

6. Configuring the server during packaging


In addition to Galleon layers that you can use to configure the server, you can fine tune the server during packaging.

The Maven plugin allows you to:

Run WildFly CLI (https://docs.wildfly.org/29.0/Admin_Guide.html#Command_Line_Interface) scripts (see logging


(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/logging) example to configure loggers).

Add extra content that you want to see packaged in the server (eg: standalone/configuration/application-users.properties,
standalone/configuration/keystore.jks, …​). The example https
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/https) shows how to package a keystore file in the
bootable JAR.

NB: The configuration changes applied during packaging are persisted in the server configuration.

Using a custom appender as a custom-handler in the logging subsystem is not supported with the bootable
 JAR. This only applies to custom handlers defined on the root of the logging subsystem.

You can workaround this by supplying your own logging.properties and defining the path in the boot-logging-config
configuration property. An example can be seen in the logging-json
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/logging-json) example project.

6.1. WildFly CLI execution during packaging


Part of WildFly CLI command line tool has been integrated in the Maven plugin. The plugin supports execution of CLI script files
with a limited set of CLI configuration items.

CLI script files are text files that contain a sequence of WildFly CLI commands. Commands can be CLI defined commands (some
builtin commands allowing to achieve complex sequence of server operations) and generic management operations to be sent to
the server. Some examples can be found in WildFly administration guide CLI recipes chapter
(https://docs.wildfly.org/29.0/Admin_Guide.html#CLI_Recipes).

In the context of Bootable JAR, the script does not need to contain commands to connect to the server or start an embedded
server. The Maven plugin handles that for you by starting an embedded server for each group of scripts.

The plugin allows you to execute multiple group of scripts with different CLI contexts. A group of scripts and its configuration are
defined in a cli-session composed of:

<script-files> : the list of paths to script files .


properties-file : (optional) a path to a properties file that contains java properties that scripts can reference (using the
syntax ${my.prop} ). For example, a command that sets the public inet-address to the value of all.addresses system
property looks like: /interface=public:write-attribute(name=inet-address,value=${all.addresses})
resolve-expressions : (optional) a boolean indicating if system properties or expressions are resolved before sending the
operation requests to the server. Value is true by default.

All scripts present in a cli-session are executed within a single CLI execution. An embedded server is started for each defined
cli-session .

NB: The scripts are executed in the order they are defined in the plugin configuration.

CLI configuration example:

https://docs.wildfly.org/bootablejar/ 10/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

XML
<cli-sessions>
<cli-session>
<script-files>
<script>../scripts/script1.cli</script>
</script-files>
<!-- We want the env variables to be resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</cli-session>
<cli-session>
<script-files>
<script>../scripts/script2.cli</script>
</script-files>
<properties-file>../scripts/cli.properties</properties-file>
<!-- We want the properties to be resolved during CLI execution (not actually needed, this is the default behavior)
-->
<resolve-expressions>true</resolve-expressions>
</cli-session>
</cli-sessions>

https://docs.wildfly.org/bootablejar/ 11/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

7. Configuring the server for cloud execution


The configuration item <cloud></cloud> allows to build a bootable JAR for cloud environment. By default the server is
configured to run inside an OpenShift context. Set the cloud child element <type>openshift|kubernetes</type> to select the
targeted cloud platform.

The sever configuration is updated in order to properly operate in a cloud environment:

If no Galleon layers are provisioned, the provisioned configuration is standalone-microprofile-ha.xml instead of


standalone-microprofile.xml .

The microprofile-health (or health layer if the WildFly Galleon feature-pack doesn’t define microprofile-health
layer) and core-tools (that contains WildFly CLI) Galleon layers are provisioned. They are required for the OpenShift
probes and WildFly OpenShift Operator to properly operate.
The public and private inet addresses are bound to the value of the HOSTNAME environment variable if defined (defined in
OpenShift PODS).
The management inet address is bound to the 0.0.0.0 inet address allowing for local (required by WildFly CLI) and remote
access (required by OpenShift readiness and liveness probes).
The http and https socket-bindings are bound to 0.0.0.0 inet address.
The transaction subsystem id is set to the value of jboss.node.name .
The jboss.node.name system propery, if not set, is set to the value of HOSTNAME environment variable if defined (defined in
OpenShift PODS). The node name value is truncated to a max of 23 characters in order for the transaction subsystem to
properly operate. The last 23 characters are taken into account.
The server logs are printed to the console.
jgroups subsystem is configured to use kubernetes.KUBE_PING jgroups protocol for both tcp (default stack) and udp. PING and
MPING protocols are removed.
It is possible to configure jgroups to use un-encrypted password authentication. Set the <cloud> child element <enable-
jgroups-password>true|false</enable-jgroups-password> to enable authentication. NB: When authentication is enabled,
the environment variable JGROUPS_CLUSTER_PASSWORD must be set.

Some examples:

Configure for OpenShift execution:

XML
<cloud/>

Configure for OpenShift execution with jgroups authentication enabled:

XML
<cloud>
<enable-jgroups-password>true</enable-jgroups-password>
</cloud>

Configure for kubernetes execution:

XML
<cloud>
<type>kubernetes</type>
</cloud>

https://docs.wildfly.org/bootablejar/ 12/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

7.1. OpenShift Deployment using Eclipse JKube


JKube Maven plugin (https://github.com/eclipse/jkube) contains support for WildFly bootable JAR. The jkube
(https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/jkube) example shows how to combine WildFly
bootable JAR and JKube Maven plugins in order to deploy an application on OpenShift.

7.2. WildFly OpenShift Operator


The WildFly OpenShift Operator can be used to manage deployments based on image containing a WildFly bootable JAR. At boot
time, the WildFly bootable JAR dumps in the file /opt/jboss/container/wildfly-bootable-jar/install-dir its installation
path. This information is required by the WildFly OpenShift Operator to retrieve transaction logs and call into WildFly CLI.

When deploying WildFly bootable JAR using openjdk image it is strongly advised to set
 `GC_METASPACE_SIZE=96 `environment variable.

https://docs.wildfly.org/bootablejar/ 13/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

8. Configuring the server at runtime


The server can be configured using WildFly management tooling (WildFly CLI, HAL web console, …​).

In an OpenShift context, the WildFly CLI tool can be retrieved in the bootable JAR installation directory (advertised in the
/opt/jboss/container/wildfly-bootable-jar/install-dir file).

NB: Configuration changes are not persisted. Once the server is killed, management updates are lost.

https://docs.wildfly.org/bootablejar/ 14/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

9. Other Maven plugin goals


In addition the main package goal used to build a bootable JAR, the following goals are available:

dev: To build a bootable JAR in 'dev' mode.


run: To launch the bootable JAR foreground (blocking).
start: To launch the bootable JAR in background (non blocking).
shutdown: To kill a running bootable JAR.

In order to shutdown a running bootable JAR (started with 'start' or 'dev' goals), the 'management' Galleon
 layer must have been provisioned. That is required for the plugin to be able to access the running server
management interface. If that is not the case, the server would have to be killed.

Check the Maven plugin documentation for an exhaustive list of configuration elements usable with each goal.

https://docs.wildfly.org/bootablejar/ 15/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

10. Development mode (dev mode)


When packaging a bootable JAR, a WildFly server is provisioned and customization (if any) is applied. Rebuilding a bootable JAR
each time is time consuming and slows down the application development process.

We offer 2 different dev goals:

10.1. Development mode with source watching


In order to speed-up the development of your application, the Maven plugin offers a dev-watch goal that builds and starts the
bootable JAR only once then watch for changes in order to rebuild and redeploy your application.

The workflow to follow during development is:

mvn wildfly-jar:dev-watch
The plugin builds your application, build an hollow server bootable JAR and starts it, then monitors the projects to detect
source files changes and rebuild/redeploy the application.
The goal dev-watch is blocking. When done, type Ctrl-C in the console to stop the process.

Watch details:

war , jar and ejb packaging are supported.


Applications are deployed as exploded deployments.
Any change to the project build sources (default to src/main/java ) implies a recompile, repackage and redeploy.

Any change to the src/main/webapp implies a copy of the file in the exploded deployment and a redeploy.
Any change to the default resources src/main/resources as well as configured resource directories in pom.xml implies a
repackage and redeploy.
Any change to the pom.xml file outside of the plugin configuration implies a recompile, repackage and redeploy.
Any change to the plugin configuration implies rebuild/restart of the bootable JAR, recompile, repackage and redeploy.
Any change to CLI scripts or CLI properties files implies rebuild/restart of the bootable JAR, recompile, repackage and
redeploy.
Any change to extra content directories implies rebuild/restart of the bootable JAR, recompile, repackage and redeploy.

Error handling:

The dev-watch goal will not exit on error. Errors are advertised in the console.

Compilation errors are printed in the console. Fix the files, recompilation will occur.
Re-build of bootable JAR errors (eg: usage of invalid Galleon layer) are printed in the console. Fix the pom.xml file,
rebuild/restart and redeploy will occur.
Server startup errors are printed in the console. Fix your application, the application will get redeployed.

Limitations:

No support for multi modules.


No support for resources filtering (include/exclude). The resources directory is watched fully, this means that some re-deploy
could be started for resources excluded from the project.

https://docs.wildfly.org/bootablejar/ 16/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

10.2. Remote development mode with source watching


Sometimes it might be required to develop the application remotely, for example in a cloud environment. The workflow is the
same as the one of Development mode with source watching and it is using the same dev-watch goal. The only required changes
is about configuring how to connect to the remote application using the management API.

So you have to configure your bootable jar to allow remote connection to the management interface. For example such a script
would create an account admin/passW0rd!

BASH
/subsystem=elytron/security-domain=ManagementDomain:undefine-attribute(name=default-realm)
/subsystem=elytron/security-domain=ManagementDomain:list-remove(name=realms, index=0)
/subsystem=elytron/properties-realm=ManagementRealm:remove
/subsystem=elytron/filesystem-realm=ManagementRealm:add(path=management-realm, relative-to=jboss.server.config.dir)
reload --start-mode=admin-only
/subsystem=elytron/filesystem-realm=ManagementRealm:add-identity(identity=admin)
/subsystem=elytron/filesystem-realm=ManagementRealm:add-identity-attribute(identity=admin, name=groups, value=[admin])
/subsystem=elytron/filesystem-realm=ManagementRealm:set-password(identity=admin, clear={password=passW0rd!})
/subsystem=elytron/security-domain=ManagementDomain:list-add(name=realms, index=0, value={realm=ManagementRealm})
/subsystem=elytron/security-domain=ManagementDomain:write-attribute(name=default-realm, value=ManagementRealm

So once you have your application running you can execute the goal locally like this:

BASH
mvn org.wildfly.plugins:wildfly-jar-maven-plugin:dev-watch\
-Dwildfly.bootable.remote=true\
-Dwildfly.hostname=microprofile-config-bootable-management-ehugonne1-dev.apps.sandbox-
m2.ll9k.p1.openshiftapps.com\
-Dwildfly.port=443\
-Dwildfly.bootable.remote.protocol=remote+https\
-Dwildfly.bootable.remote.username=admin\
-Dwildfly.bootable.remote.password=passW0rd!

Error handling:

The dev-watch goal will not exit on error. Errors are advertised in the console.

Compilation errors are printed in the console. Fix the files, recompilation will occur.
Server related errors are printed on the server itself.

Limitations:

No support for multi modules.


No support for resources filtering (include/exclude). The resources directory is watched fully, this means that some re-deploy
could be started for resources excluded from the project.
No support for complete rebuild of the server: you can’t expect cli scripts or layer changes to be taken into account. You would
need to rebuild the full bootable jar and relaunch it.

10.3. Development mode with repackaging


In order to speed-up the development of your application, the Maven plugin offers a dev goal that builds and starts the bootable
JAR only once.

The workflow to follow during development is:

mvn wildfly-jar:dev
The plugin builds an hollow server bootable JAR and starts it. The server uses the deployment scanner to monitor the
target/deployments directory in which your application will be copied during packaging.
mvn package -Ddev

https://docs.wildfly.org/bootablejar/ 17/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Note the -Ddev system property passed to the package goal. This informs the plugin to skip creation of the bootable JAR and
to copy your application to target/deployments directory. The running server detects the application and deploys it.
Do changes in your application code.
mvn package -Ddev
Once your application is built, the plugin copies it to the target/deployments directory. The running server detects the
updated application and re-deploys it.
When done, kill the server: mvn wildfly-jar:shutdown
When you are done with your application, create the final packaging by calling: mvn package
NB: Although the dev mode relies on the deployment scanner, you can safely exclude it from the set of layers. The Maven plugin
forces its presence when the server is started in dev mode.

https://docs.wildfly.org/bootablejar/ 18/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

11. Enabling debug


You can enable debug by passing the -agentlib:jdwp argument, for example:

java -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n -jar myapp-bootable.jar

When using 'dev', 'run' or 'start' goals you can set the jvmArguments configuration element to contain the same argument, for
example:

XML
<configuration>
<jvmArguments>
<arg>-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n</arg>
</jvmArguments>
</configuration>

11.1. Enable Debug for Openshift


When using the registry.redhat.io/ubi8/openjdk-11 docker image to run a bootable JAR, you must set the following env
variables to enable debug:

JAVA_DEBUG=true
JAVA_DEBUG_PORT=8787

Then enable port forwarding:

oc get pods
oc port-forward <pod name> 8787:8787

Finally, you can attach your debugger to 127.0.0.1:8787

https://docs.wildfly.org/bootablejar/ 19/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

12. Advanced usages


12.1. Provisioning a slim bootable JAR
A slim bootable JAR is a JAR that doesn’t contain JBoss modules JAR files. The JBoss modules JAR files are retrieved from the local
Maven repository. Such slim bootable JAR is much smaller and starts faster.

To enable slim bootable JAR use the plugin-options configuration element and add to it the jboss-maven-dist element. For
example:

XML
<plugin-options>
<jboss-maven-dist/>
</plugin-options>

When running a slim bootable JAR, the default local Maven repository is used to resolve JBoss modules artifacts (in your
development environment it shouldn’t require special setup to start the bootable JAR).

This can be overridden by using the -Dmaven.repo.local=<path to repository> when launching the server, for example:

java -Dmaven.repo.local=/opt/maven/maven-repo -jar jaxrs-bootable.jar

12.1.1. Generating a Maven local repository during packaging


The Maven plugin can generate a Maven repository directory containing all the JBoss modules artifacts required by the slim
bootable JAR. The generated Maven repository allows to run a slim bootable JAR in a context were no local Maven cache is
present.

To enable slim bootable JAR Maven repository generation, use the plugin-options configuration element and add to it the jboss-
maven-dist and jboss-maven-repo elements. For example:

XML
<plugin-options>
<jboss-maven-dist/>
<jboss-maven-repo>target/my-maven-repo</jboss-maven-repo>
</plugin-options>

In this example, the directory <project directory>/target/my-maven-repo is created and contains the set of JBoss modules JAR
required to start the server.

The slim (https://github.com/wildfly-extras/wildfly-jar-maven-plugin/tree/10.0.0.Final/examples/slim) example shows how to build a slim


bootable JAR and generate a local Maven repository used at startup.

12.2. Provisioning with WildFly Channels


It is possible to configure the plugin to use WildFly channels (https://github.com/wildfly-extras/wildfly-channel). WildFly Channel yaml
files URL and/or Maven Coordinates (version being optional) can be set thanks to the <channels> configuration item.

https://docs.wildfly.org/bootablejar/ 20/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

XML
<channels>
<channel>
<manifest>
<url>file://${project.basedir}/my-channel.yaml</url>
</manifest>
</channel>
<channel>
<manifest>
<!-- Use latest channel version -->
<groupId>org.foo.bar</groupId>
<artifactId>my-channel</artifactId>
<!-- Uncomment to use a specific channel version -->
<!--<version>2.0.0.Final</version>-->
</manifest>
</channel>
</channels>

12.3. Upgrading a bootable JAR


This Feature is deprecated. It is going to be replaced by the usage of WildFly Channels.

NB: This feature can’t be used when WildFly Channels are configured.

The artifacts referenced from JBoss Modules modules and Galleon feature-packs dependencies can be overridden when building
a bootable JAR. This mechanism is based on Maven dependencies resolution.

The set of artifacts that can be upgraded can be retrieved by setting the parameter <dump-original-artifacts>true</dump-
original-artifacts> or the system property bootable.jar.dump.original.artifacts to true when building a bootable JAR.
The file target/bootable-jar-build-artifacts/bootable-jar-server-original-artifacts.xml is generated. It contains
XML elements for the Galleon feature-packs dependencies, JBoss Modules runtime and artifacts. JBoss Modules modules artifacts
are grouped by JBoss Modules name. The generated file contains only the artifacts that are provisioned by Galleon. Each artifact
version is the one that would get installed when building the Bootable JAR without upgrade.

The Maven artifacts to upgrade must be added to the <dependencies> of your Maven project (with a provided scope to avoid
the dependency to be added to your application). In addition, the plugin configuration element <overridden-server-
artifacts> must contain the artifacts. For example, the version 3.0.0 of io.undertow:undertow-core will replace the version
referenced in the WildFly Galleon feature-pack used to build the bootable JAR:

XML
<dependencies>
...
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<scope>provided</scope>
<version>3.0.0</version>
</dependency>
...
</dependencies>
...
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<configuration>
<overridden-server-artifacts>
<artifact>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</artifact>
</overridden-server-artifacts>
...

Some notes:

The server jar components that can be upgraded are:

https://docs.wildfly.org/bootablejar/ 21/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

The JBoss module runtime jar (jboss-modules.jar file).


All jar artifacts referenced from JBoss Modules modules.
If an overridden artifact is no present in the dependencies, then a failure occurs during build.
An artifact upgraded to the same version as the one referenced in the Galleon feature-pack is not upgraded. In this case a
warning is displayed during build.
It is possible to downgrade an artifact to an older version. In this case a warning is displayed during build.
An artifact is referenced in the overridden-server-artifacts by GroupId, Artifactid and optionally Classifier. Version is
being retrieved from the Maven dependencies if not set in the overridden artifact.
An artifact presents in the overridden-server-artifacts list must be unique. Any duplicate will make the packaging to fail.
Adding an overridden artifact that is not part of the provisioned server artifacts will lead to a failure during build.
Adding an overridden Galleon feature-pack artifact that is not a dependency of the WildFly server being provisioned will lead
to an error during packaging.
Third party galleon feature-packs (eg: keycloak Galleon feature-pack) benefit from this upgrade capability for JBoss Modules
modules artifacts they are bringing to the provisioned server.

https://docs.wildfly.org/bootablejar/ 22/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

13. Troubleshooting
13.1. Out of Memory error when building
When building a large number of projects in the same Maven session you can encounter OOM error, this can be solved in various
ways:

You can increase the metaspace size of the Maven execution by setting the MAVEN_OPTS="-XX:MaxMetaspaceSize=<value>"
environment variable.
Or you can configure the plugin to fork part of its execution in remote processes:

<configuration>
...
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>
</configuration>

https://docs.wildfly.org/bootablejar/ 23/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

14. Maven plugin


This chapter is dedicated to the Maven plugin that can be used to build WildFly bootable JAR. Maven coordinates of the Maven
plugin artifact are

XML
<dependency>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<version>10.0.0.Final</version>
</dependency>

14.1. Goals overview


dev Build and start a WildFly bootable JAR for dev mode.

help Prints help for the plugin.

package Build a WildFly bootable JAR.

run Run a WildFly bootable JAR (blocking).

shutdown Shutdown a WildFly bootable JAR.

start Start a WildFly bootable JAR (non blocking).

14.2. dev
14.2.1. wildfly-jar:dev
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:10.0.0.Final:dev

14.2.2. Description
Build and start a bootable JAR for dev mode. In order to be able to shutdown the server started in 'dev' mode, the 'management'
Galleon layer must have been included. If that is not the case, the server would have to be killed.

14.2.3. Attributes
Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: compile+runtime .

Binds by default to the lifecycle phase (http://maven.apache.org/ref/current/maven-core/lifecycles.html): compile .

Table 1. Optional Parameters

Name Type Since Description

[arguments] List - Bootable JAR server arguments.


User property is: wildfly.bootable.arguments .

https://docs.wildfly.org/bootablejar/ 24/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[bootLoggingConfig] File - Overrides the default logging.properties the container


uses when booting.
In most cases this should not be required. The use-case is
when the generated logging.properties causes boot
errors or you do not use the logging subsystem and would
like to use a custom logging configuration.
An example of a boot error would be using a json formatted
file as a custom-handler . If the file is not absolute, it has to
be relative to the project base directory.
User property is: wildfly.bootable.logging.config .
Alias is: boot-logging-config .

[bootableJarBuildArtifacts] String - By default, when building a bootable JAR, the plugin extracts
build artifacts in the directory 'bootable-jar-build-artifacts'.
You can use this property to change this directory name. In
most cases this should not be required. The use-case is when
building multiple bootable JARs in the same project on
Windows Platform. In this case, each execution should have
its own directory, the plugin being unable to delete the
directory due to some references to JBoss module files.
Default value is: bootable-jar-build-artifacts .
User property is:
wildfly.bootable.jar.build.artifacts .
Alias is: bootable-jar-build-artifacts .

[channels] List - List of channel URL and/or Maven coordinates (version being
optional).
Alias is: channels .

[cliSessions] List - List of CLI execution sessions. An embedded server is started


for each CLI session. If a script file is not absolute, it has to be
relative to the project base directory. CLI session are
configured in the following way:
<cli-sessions>
<cli-session>
<script-files>
<script>../scripts/script1.cli</script>
</script-files>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</cli-session>
<cli-session>
<script-files>
<script>../scripts/script2.cli</script>
</script-files>
<properties-file>../scripts/cli.properties</properties-file>
</cli-session>
</cli-sessions>
Alias is: cli-sessions .

https://docs.wildfly.org/bootablejar/ 25/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[cloud] CloudConfig - To enable cloud support. When cloud support is enabled, the
created bootable JAR will operate properly in context such as
openshift.
In order to enable authenticated cluster jgroups protocol, set
<enable-jgroups-password>true</enable-jgroups-password>.
The environment variable JGROUPS_CLUSTER_PASSWORD
must then be set to the password value.
Alias is: cloud .

[contextRoot] boolean - To make the WAR deployment registered under root resource
path ('/').
Default value is: true .
User property is: wildfly.bootable.context.root .
Alias is: context-root .

[disableWarnForArtifactDowngrade] boolean - Deprecated. The plugin prints a warning when an overridden


artifact is downgraded (updated to an older version). The
version comparison is done based on Maven versioning. This
warning can be disabled by setting this parameter to true.
Default value is: false .
User property is:
bootable.jar.disable.warn.for.artifact.downgrade .
Alias is: disable-warn-for-artifact-downgrade .

[displayCliScriptsOutput] boolean - By default executed CLI scripts output is not shown if


execution is successful. In order to display the CLI output, set
this option to true.
Alias is: display-cli-scripts-output .

[dumpOriginalArtifacts] boolean - Deprecated. Set this parameter to true in order to retrieve the
set of artifacts that can be upgraded. The file
target/bootable-jar-build-artifacts/bootable-jar-
server-original-artifacts.xml is generated. It contains
XML elements for the Galleon feature-packs dependencies,
JBoss Modules runtime and artifacts. JBoss Modules modules
artifacts are grouped by JBoss Modules name. The generated
file contains only the artifacts that are provisioned by
Galleon. Each artifact version is the one that would get
installed when building the Bootable JAR without upgrade.
Default value is: false .
User property is:
bootable.jar.dump.original.artifacts .
Alias is: dump-original-artifacts .

[excludedLayers] List - A list of Galleon layers to exclude. Can be used when feature-
pack-location or feature-packs are set.
Alias is: excluded-layers .

[extraServerContentDirs] List - A list of directories to copy content to the provisioned server.


If a directory is not absolute, it has to be relative to the
project base directory.
User property is:
wildfly.bootable.package.extra.server.content.dirs .
Alias is: extra-server-content-dirs .

https://docs.wildfly.org/bootablejar/ 26/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[featurePackLocation] String - The WildFly Galleon feature-pack location to use if no


provisioning.xml file found. Can’t be used in conjunction with
feature-packs.
User property is: wildfly.bootable.fpl .
Alias is: feature-pack-location .

[featurePacks] List - A list of feature-pack configurations to install, can be


combined with layers. Overrides galleon/provisioning.xml
file. Can’t be used in conjunction with feature-pack-location.
Alias is: feature-packs .

[hollowJar] boolean - Hollow JAR. Create a bootable JAR that doesn’t contain
application.
User property is: wildfly.bootable.hollow .
Alias is: hollow-jar .

[installArtifactClassifier] String - When calling mvn 'install', the bootable JAR artifact is
attached to the project with the classifier 'bootable'. Use this
parameter to configure the classifier.
Default value is: bootable .
User property is:
bootable.jar.install.artifact.classifier .
Alias is: install-artifact-classifier .

[jvmArguments] List - Additional JVM options.


User property is: wildfly.bootable.jvmArguments .

[layers] List - A list of Galleon layers to provision. Can be used when


feature-pack-location or feature-packs are set.
Alias is: layers .

[legacyPatchCleanUp] boolean - Deprecated. Set to true to enable patch cleanup. When


cleanup is enabled, unused added modules, patched modules
original directories, unused overlay directories and
.installation/patches directory are deleted.
Default value is: false .
Alias is: legacy-patch-clean-up .

[legacyPatchCliScript] String - Deprecated. Path to a CLI script that applies legacy patches.
Content of such script should be composed of 'patch apply
[path to zip file] [patch apply options]' commands. Due to the
nature of a bootable JAR trimmed with Galleon, part of the
content of the patch can be missing. In order to force the
patch to apply use the '--override-all' option. The '--
distribution' option is not needed, System property
'jboss.home.dir' is automatically set to the server that will be
packaged in the bootable JAR. If the script file is not absolute,
it has to be relative to the project base directory. NB: The
server is patched with a legacy patch right after the server
has been provisioned with Galleon.
Alias is: legacy-patch-cli-script .

[logTime] boolean - Whether to log provisioning time at the end


Default value is: false .
Alias is: log-time .

https://docs.wildfly.org/bootablejar/ 27/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[offline] boolean - Whether to use offline mode when the plugin resolves an
artifact. In offline mode the plugin will only use the local
Maven repository for an artifact resolution.
Default value is: false .
Alias is: offline .

[outputFileName] String - By default the generated JAR is ${project.build.finalName}-


bootable.jar
User property is:
wildfly.bootable.package.output.file.name .
Alias is: output-file-name .

[overriddenServerArtifacts] List - Deprecated. A list of artifacts that override the one


referenced in the WildFly Galleon feature-pack used to build
the Bootable JAR. The artifacts present in this list must exist
in the project dependencies (with a provided scope).
GroupId and ArtifactId are mandatory. Classifier is required
if non null. Version and Type are optional and are retrieved
from the project dependencies. Dependencies on Galleon
feature-pack can also be referenced from this list. zip type
must be used for Galleon feature-packs. NB: This
configuration item can’t be used when Channels are in use.
Example of an override of the io.undertow:undertow-core
artifact:
<overridden-server-artifacts>
<artifact>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</artifact>
</overridden-server-artifacts> +
Alias is: overridden-server-artifacts .

[pluginOptions] Map - Arbitrary Galleon options used when provisioning the server.
In case you are building a large amount of bootable JAR in
the same maven session, it is strongly advised to set 'jboss-
fork-embedded' option to 'true' in order to fork Galleon
provisioning and CLI scripts execution in dedicated
processes. For example:
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>
Alias is: plugin-options .

[projectBuildDir] String - Project build dir.


Default value is: ${project.build.directory} .

[provisioningFile] File - The path to the provisioning.xml file to use. Note that this
cannot be used with the feature-packs or layers
configuration parameters. If the provisioning file is not
absolute, it has to be relative to the project base directory.
Default value is:
${project.basedir}/galleon/provisioning.xml .
User property is: wildfly.bootable.provisioning.file .
Alias is: provisioning-file .

https://docs.wildfly.org/bootablejar/ 28/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[recordState] boolean - Whether to record provisioned state in .galleon directory.


Default value is: false .
Alias is: record-state .

[skip] boolean - Set to true if you want the deployment to be skipped,


otherwise false .
Default value is: false .
User property is: wildfly.bootable.package.skip .

[stdout] String - Indicates how stdout and stderr should be handled for
the server process. A value of inherit means that the
standard output streams are inherited from the current
process. Any other value is assumed to be a path. In this case
both stdout and stderr will be redirected to a file.
Default value is: ${project.build.directory}/wildfly-
jar-dev-stdout.log .
User property is: wildfly.bootable.stdout .

14.2.4. Parameter Details


arguments
Bootable JAR server arguments.

Type: java.util.List
Required: No
User Property: wildfly.bootable.arguments

bootLoggingConfig
Overrides the default logging.properties the container uses when booting.
In most cases this should not be required. The use-case is when the generated logging.properties causes boot errors or you do
not use the logging subsystem and would like to use a custom logging configuration.
An example of a boot error would be using a json formatted file as a custom-handler . If the file is not absolute, it has to be
relative to the project base directory.

Type: java.io.File
Required: No
User Property: wildfly.bootable.logging.config
Alias: boot-logging-config

bootableJarBuildArtifacts
By default, when building a bootable JAR, the plugin extracts build artifacts in the directory 'bootable-jar-build-artifacts'. You can
use this property to change this directory name. In most cases this should not be required. The use-case is when building multiple
bootable JARs in the same project on Windows Platform. In this case, each execution should have its own directory, the plugin
being unable to delete the directory due to some references to JBoss module files.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.jar.build.artifacts
Default: bootable-jar-build-artifacts
Alias: bootable-jar-build-artifacts

channels
List of channel URL and/or Maven coordinates (version being optional).

https://docs.wildfly.org/bootablejar/ 29/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Type: java.util.List
Required: No
Alias: channels

cliSessions
List of CLI execution sessions. An embedded server is started for each CLI session. If a script file is not absolute, it has to be
relative to the project base directory. CLI session are configured in the following way:
<cli-sessions>
<cli-session>
<script-files>
<script>../scripts/script1.cli</script>
</script-files>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</cli-session>
<cli-session>
<script-files>
<script>../scripts/script2.cli</script>
</script-files>
<properties-file>../scripts/cli.properties</properties-file>
</cli-session>
</cli-sessions>

Type: java.util.List
Required: No
Alias: cli-sessions

cloud
To enable cloud support. When cloud support is enabled, the created bootable JAR will operate properly in context such as
openshift.
In order to enable authenticated cluster jgroups protocol, set <enable-jgroups-password>true</enable-jgroups-password>. The
environment variable JGROUPS_CLUSTER_PASSWORD must then be set to the password value.

Type: org.wildfly.plugins.bootablejar.maven.cloud.CloudConfig
Required: No
Alias: cloud

contextRoot
To make the WAR deployment registered under root resource path ('/').

Type: boolean
Required: No
User Property: wildfly.bootable.context.root
Default: true
Alias: context-root

disableWarnForArtifactDowngrade
Deprecated. The plugin prints a warning when an overridden artifact is downgraded (updated to an older version). The version
comparison is done based on Maven versioning. This warning can be disabled by setting this parameter to true.

Type: boolean

https://docs.wildfly.org/bootablejar/ 30/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Required: No
User Property: bootable.jar.disable.warn.for.artifact.downgrade
Default: false
Alias: disable-warn-for-artifact-downgrade
displayCliScriptsOutput
By default executed CLI scripts output is not shown if execution is successful. In order to display the CLI output, set this option to
true.

Type: boolean
Required: No
Alias: display-cli-scripts-output

dumpOriginalArtifacts
Deprecated. Set this parameter to true in order to retrieve the set of artifacts that can be upgraded. The file target/bootable-
jar-build-artifacts/bootable-jar-server-original-artifacts.xml is generated. It contains XML elements for the
Galleon feature-packs dependencies, JBoss Modules runtime and artifacts. JBoss Modules modules artifacts are grouped by JBoss
Modules name. The generated file contains only the artifacts that are provisioned by Galleon. Each artifact version is the one that
would get installed when building the Bootable JAR without upgrade.

Type: boolean
Required: No
User Property: bootable.jar.dump.original.artifacts
Default: false
Alias: dump-original-artifacts

excludedLayers
A list of Galleon layers to exclude. Can be used when feature-pack-location or feature-packs are set.

Type: java.util.List
Required: No
Alias: excluded-layers

extraServerContentDirs
A list of directories to copy content to the provisioned server. If a directory is not absolute, it has to be relative to the project base
directory.

Type: java.util.List
Required: No
User Property: wildfly.bootable.package.extra.server.content.dirs
Alias: extra-server-content-dirs

featurePackLocation
The WildFly Galleon feature-pack location to use if no provisioning.xml file found. Can’t be used in conjunction with feature-
packs.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.fpl
Alias: feature-pack-location

https://docs.wildfly.org/bootablejar/ 31/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

featurePacks
A list of feature-pack configurations to install, can be combined with layers. Overrides galleon/provisioning.xml file. Can’t be used
in conjunction with feature-pack-location.

Type: java.util.List
Required: No
Alias: feature-packs

hollowJar
Hollow JAR. Create a bootable JAR that doesn’t contain application.

Type: boolean
Required: No
User Property: wildfly.bootable.hollow
Alias: hollow-jar

installArtifactClassifier
When calling mvn 'install', the bootable JAR artifact is attached to the project with the classifier 'bootable'. Use this parameter to
configure the classifier.

Type: java.lang.String
Required: No
User Property: bootable.jar.install.artifact.classifier
Default: bootable
Alias: install-artifact-classifier

jvmArguments
Additional JVM options.

Type: java.util.List
Required: No
User Property: wildfly.bootable.jvmArguments

layers
A list of Galleon layers to provision. Can be used when feature-pack-location or feature-packs are set.

Type: java.util.List
Required: No
Alias: layers

legacyPatchCleanUp
Deprecated. Set to true to enable patch cleanup. When cleanup is enabled, unused added modules, patched modules original
directories, unused overlay directories and .installation/patches directory are deleted.

Type: boolean
Required: No
Default: false
Alias: legacy-patch-clean-up

https://docs.wildfly.org/bootablejar/ 32/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

legacyPatchCliScript
Deprecated. Path to a CLI script that applies legacy patches. Content of such script should be composed of 'patch apply [path to zip
file] [patch apply options]' commands. Due to the nature of a bootable JAR trimmed with Galleon, part of the content of the patch
can be missing. In order to force the patch to apply use the '--override-all' option. The '--distribution' option is not needed, System
property 'jboss.home.dir' is automatically set to the server that will be packaged in the bootable JAR. If the script file is not
absolute, it has to be relative to the project base directory. NB: The server is patched with a legacy patch right after the server has
been provisioned with Galleon.

Type: java.lang.String
Required: No
Alias: legacy-patch-cli-script

logTime
Whether to log provisioning time at the end

Type: boolean
Required: No
Default: false
Alias: log-time

offline
Whether to use offline mode when the plugin resolves an artifact. In offline mode the plugin will only use the local Maven
repository for an artifact resolution.

Type: boolean
Required: No
Default: false
Alias: offline

outputFileName
By default the generated JAR is ${project.build.finalName}-bootable.jar

Type: java.lang.String
Required: No
User Property: wildfly.bootable.package.output.file.name
Alias: output-file-name

overriddenServerArtifacts
Deprecated. A list of artifacts that override the one referenced in the WildFly Galleon feature-pack used to build the Bootable JAR.
The artifacts present in this list must exist in the project dependencies (with a provided scope). GroupId and ArtifactId are
mandatory. Classifier is required if non null. Version and Type are optional and are retrieved from the project dependencies.
Dependencies on Galleon feature-pack can also be referenced from this list. zip type must be used for Galleon feature-packs. NB:
This configuration item can’t be used when Channels are in use.
Example of an override of the io.undertow:undertow-core artifact:
<overridden-server-artifacts>
<artifact>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</artifact>
</overridden-server-artifacts>

Type: java.util.List

https://docs.wildfly.org/bootablejar/ 33/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Required: No
Alias: overridden-server-artifacts
pluginOptions
Arbitrary Galleon options used when provisioning the server. In case you are building a large amount of bootable JAR in the same
maven session, it is strongly advised to set 'jboss-fork-embedded' option to 'true' in order to fork Galleon provisioning and CLI
scripts execution in dedicated processes. For example:
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>

Type: java.util.Map
Required: No
Alias: plugin-options

projectBuildDir
Project build dir.

Type: java.lang.String
Required: No
Default: ${project.build.directory}

provisioningFile
The path to the provisioning.xml file to use. Note that this cannot be used with the feature-packs or layers configuration
parameters. If the provisioning file is not absolute, it has to be relative to the project base directory.

Type: java.io.File
Required: No
User Property: wildfly.bootable.provisioning.file
Default: ${project.basedir}/galleon/provisioning.xml
Alias: provisioning-file

recordState
Whether to record provisioned state in .galleon directory.

Type: boolean
Required: No
Default: false
Alias: record-state

skip
Set to true if you want the deployment to be skipped, otherwise false .

Type: boolean
Required: No
User Property: wildfly.bootable.package.skip
Default: false

stdout
Indicates how stdout and stderr should be handled for the server process. A value of inherit means that the standard
output streams are inherited from the current process. Any other value is assumed to be a path. In this case both stdout and

https://docs.wildfly.org/bootablejar/ 34/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

stderr will be redirected to a file.


Type: java.lang.String
Required: No
User Property: wildfly.bootable.stdout
Default: ${project.build.directory}/wildfly-jar-dev-stdout.log

14.3. dev-watch
14.3.1. wildfly-jar:dev-watch
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:10.0.0.Final:dev-watch

14.3.2. Description
Build and start a bootable JAR for dev-watch mode. This goal monitors the changes in the project and recompile/re-deploy. Type
Ctrl-C to kill the running server.

14.3.3. Attributes
Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: compile+runtime .

Binds by default to the lifecycle phase (http://maven.apache.org/ref/current/maven-core/lifecycles.html): compile .

Table 2. Optional Parameters

Name Type Since Description

[arguments] List - Bootable JAR server arguments.


User property is: wildfly.bootable.arguments .

[bootLoggingConfig] File - Overrides the default logging.properties the container


uses when booting.
In most cases this should not be required. The use-case is
when the generated logging.properties causes boot
errors or you do not use the logging subsystem and would
like to use a custom logging configuration.
An example of a boot error would be using a json formatted
file as a custom-handler . If the file is not absolute, it has to
be relative to the project base directory.
User property is: wildfly.bootable.logging.config .
Alias is: boot-logging-config .

[bootableJarBuildArtifacts] String - By default, when building a bootable JAR, the plugin extracts
build artifacts in the directory 'bootable-jar-build-artifacts'.
You can use this property to change this directory name. In
most cases this should not be required. The use-case is when
building multiple bootable JARs in the same project on
Windows Platform. In this case, each execution should have
its own directory, the plugin being unable to delete the
directory due to some references to JBoss module files.
Default value is: bootable-jar-build-artifacts .
User property is:
wildfly.bootable.jar.build.artifacts .
Alias is: bootable-jar-build-artifacts .

https://docs.wildfly.org/bootablejar/ 35/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[channels] List - List of channel URL and/or Maven coordinates (version being
optional).
Alias is: channels .

[cliSessions] List - List of CLI execution sessions. An embedded server is started


for each CLI session. If a script file is not absolute, it has to be
relative to the project base directory. CLI session are
configured in the following way:
<cli-sessions>
<cli-session>
<script-files>
<script>../scripts/script1.cli</script>
</script-files>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</cli-session>
<cli-session>
<script-files>
<script>../scripts/script2.cli</script>
</script-files>
<properties-file>../scripts/cli.properties</properties-file>
</cli-session>
</cli-sessions>
Alias is: cli-sessions .

[cloud] CloudConfig - To enable cloud support. When cloud support is enabled, the
created bootable JAR will operate properly in context such as
openshift.
In order to enable authenticated cluster jgroups protocol, set
<enable-jgroups-password>true</enable-jgroups-password>.
The environment variable JGROUPS_CLUSTER_PASSWORD
must then be set to the password value.
Alias is: cloud .

[contextRoot] boolean - To make the WAR deployment registered under root resource
path ('/').
Default value is: true .
User property is: wildfly.bootable.context.root .
Alias is: context-root .

[debug] boolean - Enable/Disable debug. If debugger is explicitly enabled in


JVM arguments, this option has no effect,
Default value is: false .
User property is: wildfly.bootable.debug .

[debugPort] int - Debug port.


Default value is: 8787 .
User property is: wildfly.bootable.debug.port .
Alias is: debug-port .

[debugSuspend] boolean - Debug suspend.


Default value is: false .
User property is: wildfly.bootable.debug.suspend .
Alias is: debug-suspend .

https://docs.wildfly.org/bootablejar/ 36/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[disableWarnForArtifactDowngrade] boolean - Deprecated. The plugin prints a warning when an overridden


artifact is downgraded (updated to an older version). The
version comparison is done based on Maven versioning. This
warning can be disabled by setting this parameter to true.
Default value is: false .
User property is:
bootable.jar.disable.warn.for.artifact.downgrade .
Alias is: disable-warn-for-artifact-downgrade .

[displayCliScriptsOutput] boolean - By default executed CLI scripts output is not shown if


execution is successful. In order to display the CLI output, set
this option to true.
Alias is: display-cli-scripts-output .

[dumpOriginalArtifacts] boolean - Deprecated. Set this parameter to true in order to retrieve the
set of artifacts that can be upgraded. The file
target/bootable-jar-build-artifacts/bootable-jar-
server-original-artifacts.xml is generated. It contains
XML elements for the Galleon feature-packs dependencies,
JBoss Modules runtime and artifacts. JBoss Modules modules
artifacts are grouped by JBoss Modules name. The generated
file contains only the artifacts that are provisioned by
Galleon. Each artifact version is the one that would get
installed when building the Bootable JAR without upgrade.
Default value is: false .
User property is:
bootable.jar.dump.original.artifacts .
Alias is: dump-original-artifacts .

[excludedLayers] List - A list of Galleon layers to exclude. Can be used when feature-
pack-location or feature-packs are set.
Alias is: excluded-layers .

[extraServerContentDirs] List - A list of directories to copy content to the provisioned server.


If a directory is not absolute, it has to be relative to the
project base directory.
User property is:
wildfly.bootable.package.extra.server.content.dirs .
Alias is: extra-server-content-dirs .

[featurePackLocation] String - The WildFly Galleon feature-pack location to use if no


provisioning.xml file found. Can’t be used in conjunction with
feature-packs.
User property is: wildfly.bootable.fpl .
Alias is: feature-pack-location .

[featurePacks] List - A list of feature-pack configurations to install, can be


combined with layers. Overrides galleon/provisioning.xml
file. Can’t be used in conjunction with feature-pack-location.
Alias is: feature-packs .

[hollowJar] boolean - Hollow JAR. Create a bootable JAR that doesn’t contain
application.
User property is: wildfly.bootable.hollow .
Alias is: hollow-jar .

https://docs.wildfly.org/bootablejar/ 37/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[hostname] String - Specifies the host name of the server where the deployment
plan should be executed.
Default value is: localhost .
User property is: wildfly.hostname .

[ignorePatterns] List - File patterns that we should ignore during watch. Hidden
files and files ending with '~' are ignored. You can set the
system property wildfly.bootable.ignore.patterns to a
white space separated list of file patterns.
User property is: wildfly.bootable.ignore.patterns .
Alias is: ignore-patterns .

[installArtifactClassifier] String - When calling mvn 'install', the bootable JAR artifact is
attached to the project with the classifier 'bootable'. Use this
parameter to configure the classifier.
Default value is: bootable .
User property is:
bootable.jar.install.artifact.classifier .
Alias is: install-artifact-classifier .

[jvmArguments] List - Additional JVM options.


User property is: wildfly.bootable.jvmArguments .

[layers] List - A list of Galleon layers to provision. Can be used when


feature-pack-location or feature-packs are set.
Alias is: layers .

[legacyPatchCleanUp] boolean - Deprecated. Set to true to enable patch cleanup. When


cleanup is enabled, unused added modules, patched modules
original directories, unused overlay directories and
.installation/patches directory are deleted.
Default value is: false .
Alias is: legacy-patch-clean-up .

[legacyPatchCliScript] String - Deprecated. Path to a CLI script that applies legacy patches.
Content of such script should be composed of 'patch apply
[path to zip file] [patch apply options]' commands. Due to the
nature of a bootable JAR trimmed with Galleon, part of the
content of the patch can be missing. In order to force the
patch to apply use the '--override-all' option. The '--
distribution' option is not needed, System property
'jboss.home.dir' is automatically set to the server that will be
packaged in the bootable JAR. If the script file is not absolute,
it has to be relative to the project base directory. NB: The
server is patched with a legacy patch right after the server
has been provisioned with Galleon.
Alias is: legacy-patch-cli-script .

[logTime] boolean - Whether to log provisioning time at the end


Default value is: false .
Alias is: log-time .

https://docs.wildfly.org/bootablejar/ 38/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[offline] boolean - Whether to use offline mode when the plugin resolves an
artifact. In offline mode the plugin will only use the local
Maven repository for an artifact resolution.
Default value is: false .
Alias is: offline .

[outputFileName] String - By default the generated JAR is ${project.build.finalName}-


bootable.jar
User property is:
wildfly.bootable.package.output.file.name .
Alias is: output-file-name .

[overriddenServerArtifacts] List - Deprecated. A list of artifacts that override the one


referenced in the WildFly Galleon feature-pack used to build
the Bootable JAR. The artifacts present in this list must exist
in the project dependencies (with a provided scope).
GroupId and ArtifactId are mandatory. Classifier is required
if non null. Version and Type are optional and are retrieved
from the project dependencies. Dependencies on Galleon
feature-pack can also be referenced from this list. zip type
must be used for Galleon feature-packs. NB: This
configuration item can’t be used when Channels are in use.
Example of an override of the io.undertow:undertow-core
artifact:
<overridden-server-artifacts>
<artifact>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</artifact>
</overridden-server-artifacts> +
Alias is: overridden-server-artifacts .

[password] String - Remote connection password.


User property is: wildfly.bootable.remote.password .

[pluginOptions] Map - Arbitrary Galleon options used when provisioning the server.
In case you are building a large amount of bootable JAR in
the same maven session, it is strongly advised to set 'jboss-
fork-embedded' option to 'true' in order to fork Galleon
provisioning and CLI scripts execution in dedicated
processes. For example:
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>
Alias is: plugin-options .

[port] int - Specifies the port number the server is listening on.
Default value is: 9990 .
User property is: wildfly.port .

[projectBuildDir] String - Project build dir.


Default value is: ${project.build.directory} .

https://docs.wildfly.org/bootablejar/ 39/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[protocol] String - Remote connection protocol.


Default value is: remote+http .
User property is: wildfly.bootable.remote.protocol .

[provisioningFile] File - The path to the provisioning.xml file to use. Note that this
cannot be used with the feature-packs or layers
configuration parameters. If the provisioning file is not
absolute, it has to be relative to the project base directory.
Default value is:
${project.basedir}/galleon/provisioning.xml .
User property is: wildfly.bootable.provisioning.file .
Alias is: provisioning-file .

[recordState] boolean - Whether to record provisioned state in .galleon directory.


Default value is: false .
Alias is: record-state .

[remote] boolean - Enable/Disable remote connection.


Default value is: false .
User property is: wildfly.bootable.remote .

[skip] boolean - Set to true if you want the deployment to be skipped,


otherwise false .
Default value is: false .
User property is: wildfly.bootable.package.skip .

[sourceDir] File - (no description)


Default value is: ${project.build.sourceDirectory} .

[timeout] int - The timeout, in seconds, to wait for a management


connection.
Default value is: 60 .
User property is: wildfly.timeout .

[username] String - Remote connection username.


User property is: wildfly.bootable.remote.username .

[webExtensions] List - Additional extensions of files located in src/webapp


directory and its sub-directories that don’t require a
redeployment on update. The builtin list is html, xhtml,
jsp, css . You can set the system property
wildfly.bootable.web.extensions to a white space
separated list of file extensions.
User property is: wildfly.bootable.web.extensions .
Alias is: web-extensions .

14.3.4. Parameter Details


arguments
Bootable JAR server arguments.

Type: java.util.List
Required: No
User Property: wildfly.bootable.arguments

https://docs.wildfly.org/bootablejar/ 40/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

bootLoggingConfig
Overrides the default logging.properties the container uses when booting.
In most cases this should not be required. The use-case is when the generated logging.properties causes boot errors or you do
not use the logging subsystem and would like to use a custom logging configuration.
An example of a boot error would be using a json formatted file as a custom-handler . If the file is not absolute, it has to be
relative to the project base directory.

Type: java.io.File
Required: No
User Property: wildfly.bootable.logging.config
Alias: boot-logging-config

bootableJarBuildArtifacts
By default, when building a bootable JAR, the plugin extracts build artifacts in the directory 'bootable-jar-build-artifacts'. You can
use this property to change this directory name. In most cases this should not be required. The use-case is when building multiple
bootable JARs in the same project on Windows Platform. In this case, each execution should have its own directory, the plugin
being unable to delete the directory due to some references to JBoss module files.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.jar.build.artifacts
Default: bootable-jar-build-artifacts
Alias: bootable-jar-build-artifacts

channels
List of channel URL and/or Maven coordinates (version being optional).

Type: java.util.List
Required: No
Alias: channels

cliSessions
List of CLI execution sessions. An embedded server is started for each CLI session. If a script file is not absolute, it has to be
relative to the project base directory. CLI session are configured in the following way:
<cli-sessions>
<cli-session>
<script-files>
<script>../scripts/script1.cli</script>
</script-files>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</cli-session>
<cli-session>
<script-files>
<script>../scripts/script2.cli</script>
</script-files>
<properties-file>../scripts/cli.properties</properties-file>
</cli-session>
</cli-sessions>

Type: java.util.List
Required: No

https://docs.wildfly.org/bootablejar/ 41/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Alias: cli-sessions
cloud
To enable cloud support. When cloud support is enabled, the created bootable JAR will operate properly in context such as
openshift.
In order to enable authenticated cluster jgroups protocol, set <enable-jgroups-password>true</enable-jgroups-password>. The
environment variable JGROUPS_CLUSTER_PASSWORD must then be set to the password value.

Type: org.wildfly.plugins.bootablejar.maven.cloud.CloudConfig
Required: No
Alias: cloud

contextRoot
To make the WAR deployment registered under root resource path ('/').

Type: boolean
Required: No
User Property: wildfly.bootable.context.root
Default: true
Alias: context-root

debug
Enable/Disable debug. If debugger is explicitly enabled in JVM arguments, this option has no effect,

Type: boolean
Required: No
User Property: wildfly.bootable.debug
Default: false

debugPort
Debug port.

Type: int
Required: No
User Property: wildfly.bootable.debug.port
Default: 8787
Alias: debug-port

debugSuspend
Debug suspend.

Type: boolean
Required: No
User Property: wildfly.bootable.debug.suspend
Default: false
Alias: debug-suspend

disableWarnForArtifactDowngrade
Deprecated. The plugin prints a warning when an overridden artifact is downgraded (updated to an older version). The version
comparison is done based on Maven versioning. This warning can be disabled by setting this parameter to true.

https://docs.wildfly.org/bootablejar/ 42/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Type: boolean
Required: No
User Property: bootable.jar.disable.warn.for.artifact.downgrade
Default: false
Alias: disable-warn-for-artifact-downgrade

displayCliScriptsOutput
By default executed CLI scripts output is not shown if execution is successful. In order to display the CLI output, set this option to
true.

Type: boolean
Required: No
Alias: display-cli-scripts-output

dumpOriginalArtifacts
Deprecated. Set this parameter to true in order to retrieve the set of artifacts that can be upgraded. The file target/bootable-
jar-build-artifacts/bootable-jar-server-original-artifacts.xml is generated. It contains XML elements for the
Galleon feature-packs dependencies, JBoss Modules runtime and artifacts. JBoss Modules modules artifacts are grouped by JBoss
Modules name. The generated file contains only the artifacts that are provisioned by Galleon. Each artifact version is the one that
would get installed when building the Bootable JAR without upgrade.

Type: boolean
Required: No
User Property: bootable.jar.dump.original.artifacts
Default: false
Alias: dump-original-artifacts

excludedLayers
A list of Galleon layers to exclude. Can be used when feature-pack-location or feature-packs are set.

Type: java.util.List
Required: No
Alias: excluded-layers

extraServerContentDirs
A list of directories to copy content to the provisioned server. If a directory is not absolute, it has to be relative to the project base
directory.

Type: java.util.List
Required: No
User Property: wildfly.bootable.package.extra.server.content.dirs
Alias: extra-server-content-dirs

featurePackLocation
The WildFly Galleon feature-pack location to use if no provisioning.xml file found. Can’t be used in conjunction with feature-
packs.

Type: java.lang.String
Required: No

https://docs.wildfly.org/bootablejar/ 43/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

User Property: wildfly.bootable.fpl


Alias: feature-pack-location
featurePacks
A list of feature-pack configurations to install, can be combined with layers. Overrides galleon/provisioning.xml file. Can’t be used
in conjunction with feature-pack-location.

Type: java.util.List
Required: No
Alias: feature-packs

hollowJar
Hollow JAR. Create a bootable JAR that doesn’t contain application.

Type: boolean
Required: No
User Property: wildfly.bootable.hollow
Alias: hollow-jar

hostname
Specifies the host name of the server where the deployment plan should be executed.

Type: java.lang.String
Required: No
User Property: wildfly.hostname
Default: localhost

ignorePatterns
File patterns that we should ignore during watch. Hidden files and files ending with '~' are ignored. You can set the system
property wildfly.bootable.ignore.patterns to a white space separated list of file patterns.

Type: java.util.List
Required: No
User Property: wildfly.bootable.ignore.patterns
Alias: ignore-patterns

installArtifactClassifier
When calling mvn 'install', the bootable JAR artifact is attached to the project with the classifier 'bootable'. Use this parameter to
configure the classifier.

Type: java.lang.String
Required: No
User Property: bootable.jar.install.artifact.classifier
Default: bootable
Alias: install-artifact-classifier

jvmArguments
Additional JVM options.

Type: java.util.List
Required: No

https://docs.wildfly.org/bootablejar/ 44/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

User Property: wildfly.bootable.jvmArguments


layers
A list of Galleon layers to provision. Can be used when feature-pack-location or feature-packs are set.

Type: java.util.List
Required: No
Alias: layers

legacyPatchCleanUp
Deprecated. Set to true to enable patch cleanup. When cleanup is enabled, unused added modules, patched modules original
directories, unused overlay directories and .installation/patches directory are deleted.

Type: boolean
Required: No
Default: false
Alias: legacy-patch-clean-up

legacyPatchCliScript
Deprecated. Path to a CLI script that applies legacy patches. Content of such script should be composed of 'patch apply [path to zip
file] [patch apply options]' commands. Due to the nature of a bootable JAR trimmed with Galleon, part of the content of the patch
can be missing. In order to force the patch to apply use the '--override-all' option. The '--distribution' option is not needed, System
property 'jboss.home.dir' is automatically set to the server that will be packaged in the bootable JAR. If the script file is not
absolute, it has to be relative to the project base directory. NB: The server is patched with a legacy patch right after the server has
been provisioned with Galleon.

Type: java.lang.String
Required: No
Alias: legacy-patch-cli-script

logTime
Whether to log provisioning time at the end

Type: boolean
Required: No
Default: false
Alias: log-time

offline
Whether to use offline mode when the plugin resolves an artifact. In offline mode the plugin will only use the local Maven
repository for an artifact resolution.

Type: boolean
Required: No
Default: false
Alias: offline

outputFileName
By default the generated JAR is ${project.build.finalName}-bootable.jar

Type: java.lang.String
Required: No

https://docs.wildfly.org/bootablejar/ 45/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

User Property: wildfly.bootable.package.output.file.name


Alias: output-file-name
overriddenServerArtifacts
Deprecated. A list of artifacts that override the one referenced in the WildFly Galleon feature-pack used to build the Bootable JAR.
The artifacts present in this list must exist in the project dependencies (with a provided scope). GroupId and ArtifactId are
mandatory. Classifier is required if non null. Version and Type are optional and are retrieved from the project dependencies.
Dependencies on Galleon feature-pack can also be referenced from this list. zip type must be used for Galleon feature-packs. NB:
This configuration item can’t be used when Channels are in use.
Example of an override of the io.undertow:undertow-core artifact:
<overridden-server-artifacts>
<artifact>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</artifact>
</overridden-server-artifacts>

Type: java.util.List
Required: No
Alias: overridden-server-artifacts

password
Remote connection password.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.remote.password

pluginOptions
Arbitrary Galleon options used when provisioning the server. In case you are building a large amount of bootable JAR in the same
maven session, it is strongly advised to set 'jboss-fork-embedded' option to 'true' in order to fork Galleon provisioning and CLI
scripts execution in dedicated processes. For example:
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>

Type: java.util.Map
Required: No
Alias: plugin-options

port
Specifies the port number the server is listening on.

Type: int
Required: No
User Property: wildfly.port
Default: 9990

projectBuildDir
Project build dir.

Type: java.lang.String
Required: No

https://docs.wildfly.org/bootablejar/ 46/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Default: ${project.build.directory}
protocol
Remote connection protocol.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.remote.protocol
Default: remote+http

provisioningFile
The path to the provisioning.xml file to use. Note that this cannot be used with the feature-packs or layers configuration
parameters. If the provisioning file is not absolute, it has to be relative to the project base directory.

Type: java.io.File
Required: No
User Property: wildfly.bootable.provisioning.file
Default: ${project.basedir}/galleon/provisioning.xml
Alias: provisioning-file

recordState
Whether to record provisioned state in .galleon directory.

Type: boolean
Required: No
Default: false
Alias: record-state

remote
Enable/Disable remote connection.

Type: boolean
Required: No
User Property: wildfly.bootable.remote
Default: false

skip
Set to true if you want the deployment to be skipped, otherwise false .

Type: boolean
Required: No
User Property: wildfly.bootable.package.skip
Default: false

sourceDir
(no description)

Type: java.io.File
Required: No
Default: ${project.build.sourceDirectory}

https://docs.wildfly.org/bootablejar/ 47/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

timeout
The timeout, in seconds, to wait for a management connection.

Type: int
Required: No
User Property: wildfly.timeout
Default: 60

username
Remote connection username.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.remote.username

webExtensions
Additional extensions of files located in src/webapp directory and its sub-directories that don’t require a redeployment on
update. The builtin list is html, xhtml, jsp, css . You can set the system property wildfly.bootable.web.extensions to a
white space separated list of file extensions.

Type: java.util.List
Required: No
User Property: wildfly.bootable.web.extensions
Alias: web-extensions

14.4. help
14.4.1. wildfly-jar:help
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:10.0.0.Final:help

14.4.2. Description
Display help information on wildfly-jar-maven-plugin.
Call mvn wildfly-jar:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

14.4.3. Attributes
The goal is thread-safe and supports parallel builds.

Table 3. Optional Parameters

Name Type Since Description

[detail] boolean - If true , display all settable properties for each goal.
Default value is: false .
User property is: detail .

[goal] String - The name of the goal for which to show help. If unspecified, all goals will be displayed.
User property is: goal .

[indentSize] int - The number of spaces per indentation level, should be positive.
Default value is: 2 .
User property is: indentSize .

https://docs.wildfly.org/bootablejar/ 48/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[lineLength] int - The maximum length of a display line, should be positive.


Default value is: 80 .
User property is: lineLength .

14.4.4. Parameter Details


detail
If true , display all settable properties for each goal.

Type: boolean
Required: No
User Property: detail
Default: false

goal
The name of the goal for which to show help. If unspecified, all goals will be displayed.

Type: java.lang.String
Required: No
User Property: goal

indentSize
The number of spaces per indentation level, should be positive.

Type: int
Required: No
User Property: indentSize
Default: 2

lineLength
The maximum length of a display line, should be positive.

Type: int
Required: No
User Property: lineLength
Default: 80

14.5. package
14.5.1. wildfly-jar:package
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:10.0.0.Final:package

14.5.2. Description
Build a bootable JAR containing application and provisioned server

14.5.3. Attributes
Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: compile+runtime .

Binds by default to the lifecycle phase (http://maven.apache.org/ref/current/maven-core/lifecycles.html): package .

Table 4. Optional Parameters

https://docs.wildfly.org/bootablejar/ 49/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Name Type Since Description

[bootLoggingConfig] File - Overrides the default logging.properties the container


uses when booting.
In most cases this should not be required. The use-case is
when the generated logging.properties causes boot
errors or you do not use the logging subsystem and would
like to use a custom logging configuration.
An example of a boot error would be using a json formatted
file as a custom-handler . If the file is not absolute, it has to
be relative to the project base directory.
User property is: wildfly.bootable.logging.config .
Alias is: boot-logging-config .

[bootableJarBuildArtifacts] String - By default, when building a bootable JAR, the plugin extracts
build artifacts in the directory 'bootable-jar-build-artifacts'.
You can use this property to change this directory name. In
most cases this should not be required. The use-case is when
building multiple bootable JARs in the same project on
Windows Platform. In this case, each execution should have
its own directory, the plugin being unable to delete the
directory due to some references to JBoss module files.
Default value is: bootable-jar-build-artifacts .
User property is:
wildfly.bootable.jar.build.artifacts .
Alias is: bootable-jar-build-artifacts .

[channels] List - List of channel URL and/or Maven coordinates (version being
optional).
Alias is: channels .

[cliSessions] List - List of CLI execution sessions. An embedded server is started


for each CLI session. If a script file is not absolute, it has to be
relative to the project base directory. CLI session are
configured in the following way:
<cli-sessions>
<cli-session>
<script-files>
<script>../scripts/script1.cli</script>
</script-files>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</cli-session>
<cli-session>
<script-files>
<script>../scripts/script2.cli</script>
</script-files>
<properties-file>../scripts/cli.properties</properties-file>
</cli-session>
</cli-sessions>
Alias is: cli-sessions .

https://docs.wildfly.org/bootablejar/ 50/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[cloud] CloudConfig - To enable cloud support. When cloud support is enabled, the
created bootable JAR will operate properly in context such as
openshift.
In order to enable authenticated cluster jgroups protocol, set
<enable-jgroups-password>true</enable-jgroups-password>.
The environment variable JGROUPS_CLUSTER_PASSWORD
must then be set to the password value.
Alias is: cloud .

[contextRoot] boolean - To make the WAR deployment registered under root resource
path ('/').
Default value is: true .
User property is: wildfly.bootable.context.root .
Alias is: context-root .

[disableWarnForArtifactDowngrade] boolean - Deprecated. The plugin prints a warning when an overridden


artifact is downgraded (updated to an older version). The
version comparison is done based on Maven versioning. This
warning can be disabled by setting this parameter to true.
Default value is: false .
User property is:
bootable.jar.disable.warn.for.artifact.downgrade .
Alias is: disable-warn-for-artifact-downgrade .

[displayCliScriptsOutput] boolean - By default executed CLI scripts output is not shown if


execution is successful. In order to display the CLI output, set
this option to true.
Alias is: display-cli-scripts-output .

[dumpOriginalArtifacts] boolean - Deprecated. Set this parameter to true in order to retrieve the
set of artifacts that can be upgraded. The file
target/bootable-jar-build-artifacts/bootable-jar-
server-original-artifacts.xml is generated. It contains
XML elements for the Galleon feature-packs dependencies,
JBoss Modules runtime and artifacts. JBoss Modules modules
artifacts are grouped by JBoss Modules name. The generated
file contains only the artifacts that are provisioned by
Galleon. Each artifact version is the one that would get
installed when building the Bootable JAR without upgrade.
Default value is: false .
User property is:
bootable.jar.dump.original.artifacts .
Alias is: dump-original-artifacts .

[excludedLayers] List - A list of Galleon layers to exclude. Can be used when feature-
pack-location or feature-packs are set.
Alias is: excluded-layers .

[extraServerContentDirs] List - A list of directories to copy content to the provisioned server.


If a directory is not absolute, it has to be relative to the
project base directory.
User property is:
wildfly.bootable.package.extra.server.content.dirs .
Alias is: extra-server-content-dirs .

https://docs.wildfly.org/bootablejar/ 51/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[featurePackLocation] String - The WildFly Galleon feature-pack location to use if no


provisioning.xml file found. Can’t be used in conjunction with
feature-packs.
User property is: wildfly.bootable.fpl .
Alias is: feature-pack-location .

[featurePacks] List - A list of feature-pack configurations to install, can be


combined with layers. Overrides galleon/provisioning.xml
file. Can’t be used in conjunction with feature-pack-location.
Alias is: feature-packs .

[hollowJar] boolean - Hollow JAR. Create a bootable JAR that doesn’t contain
application.
User property is: wildfly.bootable.hollow .
Alias is: hollow-jar .

[installArtifactClassifier] String - When calling mvn 'install', the bootable JAR artifact is
attached to the project with the classifier 'bootable'. Use this
parameter to configure the classifier.
Default value is: bootable .
User property is:
bootable.jar.install.artifact.classifier .
Alias is: install-artifact-classifier .

[layers] List - A list of Galleon layers to provision. Can be used when


feature-pack-location or feature-packs are set.
Alias is: layers .

[legacyPatchCleanUp] boolean - Deprecated. Set to true to enable patch cleanup. When


cleanup is enabled, unused added modules, patched modules
original directories, unused overlay directories and
.installation/patches directory are deleted.
Default value is: false .
Alias is: legacy-patch-clean-up .

[legacyPatchCliScript] String - Deprecated. Path to a CLI script that applies legacy patches.
Content of such script should be composed of 'patch apply
[path to zip file] [patch apply options]' commands. Due to the
nature of a bootable JAR trimmed with Galleon, part of the
content of the patch can be missing. In order to force the
patch to apply use the '--override-all' option. The '--
distribution' option is not needed, System property
'jboss.home.dir' is automatically set to the server that will be
packaged in the bootable JAR. If the script file is not absolute,
it has to be relative to the project base directory. NB: The
server is patched with a legacy patch right after the server
has been provisioned with Galleon.
Alias is: legacy-patch-cli-script .

[logTime] boolean - Whether to log provisioning time at the end


Default value is: false .
Alias is: log-time .

https://docs.wildfly.org/bootablejar/ 52/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[offline] boolean - Whether to use offline mode when the plugin resolves an
artifact. In offline mode the plugin will only use the local
Maven repository for an artifact resolution.
Default value is: false .
Alias is: offline .

[outputFileName] String - By default the generated JAR is ${project.build.finalName}-


bootable.jar
User property is:
wildfly.bootable.package.output.file.name .
Alias is: output-file-name .

[overriddenServerArtifacts] List - Deprecated. A list of artifacts that override the one


referenced in the WildFly Galleon feature-pack used to build
the Bootable JAR. The artifacts present in this list must exist
in the project dependencies (with a provided scope).
GroupId and ArtifactId are mandatory. Classifier is required
if non null. Version and Type are optional and are retrieved
from the project dependencies. Dependencies on Galleon
feature-pack can also be referenced from this list. zip type
must be used for Galleon feature-packs. NB: This
configuration item can’t be used when Channels are in use.
Example of an override of the io.undertow:undertow-core
artifact:
<overridden-server-artifacts>
<artifact>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</artifact>
</overridden-server-artifacts> +
Alias is: overridden-server-artifacts .

[pluginOptions] Map - Arbitrary Galleon options used when provisioning the server.
In case you are building a large amount of bootable JAR in
the same maven session, it is strongly advised to set 'jboss-
fork-embedded' option to 'true' in order to fork Galleon
provisioning and CLI scripts execution in dedicated
processes. For example:
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>
Alias is: plugin-options .

[projectBuildDir] String - Project build dir.


Default value is: ${project.build.directory} .

[provisioningFile] File - The path to the provisioning.xml file to use. Note that this
cannot be used with the feature-packs or layers
configuration parameters. If the provisioning file is not
absolute, it has to be relative to the project base directory.
Default value is:
${project.basedir}/galleon/provisioning.xml .
User property is: wildfly.bootable.provisioning.file .
Alias is: provisioning-file .

https://docs.wildfly.org/bootablejar/ 53/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[recordState] boolean - Whether to record provisioned state in .galleon directory.


Default value is: false .
Alias is: record-state .

[skip] boolean - Set to true if you want the deployment to be skipped,


otherwise false .
Default value is: false .
User property is: wildfly.bootable.package.skip .

14.5.4. Parameter Details


bootLoggingConfig
Overrides the default logging.properties the container uses when booting.
In most cases this should not be required. The use-case is when the generated logging.properties causes boot errors or you do
not use the logging subsystem and would like to use a custom logging configuration.
An example of a boot error would be using a json formatted file as a custom-handler . If the file is not absolute, it has to be
relative to the project base directory.

Type: java.io.File
Required: No
User Property: wildfly.bootable.logging.config
Alias: boot-logging-config

bootableJarBuildArtifacts
By default, when building a bootable JAR, the plugin extracts build artifacts in the directory 'bootable-jar-build-artifacts'. You can
use this property to change this directory name. In most cases this should not be required. The use-case is when building multiple
bootable JARs in the same project on Windows Platform. In this case, each execution should have its own directory, the plugin
being unable to delete the directory due to some references to JBoss module files.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.jar.build.artifacts
Default: bootable-jar-build-artifacts
Alias: bootable-jar-build-artifacts

channels
List of channel URL and/or Maven coordinates (version being optional).

Type: java.util.List
Required: No
Alias: channels

cliSessions
List of CLI execution sessions. An embedded server is started for each CLI session. If a script file is not absolute, it has to be
relative to the project base directory. CLI session are configured in the following way:
<cli-sessions>
<cli-session>
<script-files>
<script>../scripts/script1.cli</script>
</script-files>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>

https://docs.wildfly.org/bootablejar/ 54/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

</cli-session>
<cli-session>
<script-files>
<script>../scripts/script2.cli</script>
</script-files>
<properties-file>../scripts/cli.properties</properties-file>
</cli-session>
</cli-sessions>
Type: java.util.List
Required: No
Alias: cli-sessions

cloud
To enable cloud support. When cloud support is enabled, the created bootable JAR will operate properly in context such as
openshift.
In order to enable authenticated cluster jgroups protocol, set <enable-jgroups-password>true</enable-jgroups-password>. The
environment variable JGROUPS_CLUSTER_PASSWORD must then be set to the password value.

Type: org.wildfly.plugins.bootablejar.maven.cloud.CloudConfig
Required: No
Alias: cloud

contextRoot
To make the WAR deployment registered under root resource path ('/').

Type: boolean
Required: No
User Property: wildfly.bootable.context.root
Default: true
Alias: context-root

disableWarnForArtifactDowngrade
Deprecated. The plugin prints a warning when an overridden artifact is downgraded (updated to an older version). The version
comparison is done based on Maven versioning. This warning can be disabled by setting this parameter to true.

Type: boolean
Required: No
User Property: bootable.jar.disable.warn.for.artifact.downgrade
Default: false
Alias: disable-warn-for-artifact-downgrade

displayCliScriptsOutput
By default executed CLI scripts output is not shown if execution is successful. In order to display the CLI output, set this option to
true.

Type: boolean
Required: No
Alias: display-cli-scripts-output

https://docs.wildfly.org/bootablejar/ 55/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

dumpOriginalArtifacts
Deprecated. Set this parameter to true in order to retrieve the set of artifacts that can be upgraded. The file target/bootable-
jar-build-artifacts/bootable-jar-server-original-artifacts.xml is generated. It contains XML elements for the
Galleon feature-packs dependencies, JBoss Modules runtime and artifacts. JBoss Modules modules artifacts are grouped by JBoss
Modules name. The generated file contains only the artifacts that are provisioned by Galleon. Each artifact version is the one that
would get installed when building the Bootable JAR without upgrade.

Type: boolean
Required: No
User Property: bootable.jar.dump.original.artifacts
Default: false
Alias: dump-original-artifacts

excludedLayers
A list of Galleon layers to exclude. Can be used when feature-pack-location or feature-packs are set.

Type: java.util.List
Required: No
Alias: excluded-layers

extraServerContentDirs
A list of directories to copy content to the provisioned server. If a directory is not absolute, it has to be relative to the project base
directory.

Type: java.util.List
Required: No
User Property: wildfly.bootable.package.extra.server.content.dirs
Alias: extra-server-content-dirs

featurePackLocation
The WildFly Galleon feature-pack location to use if no provisioning.xml file found. Can’t be used in conjunction with feature-
packs.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.fpl
Alias: feature-pack-location

featurePacks
A list of feature-pack configurations to install, can be combined with layers. Overrides galleon/provisioning.xml file. Can’t be used
in conjunction with feature-pack-location.

Type: java.util.List
Required: No
Alias: feature-packs

hollowJar
Hollow JAR. Create a bootable JAR that doesn’t contain application.

Type: boolean

https://docs.wildfly.org/bootablejar/ 56/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Required: No
User Property: wildfly.bootable.hollow
Alias: hollow-jar
installArtifactClassifier
When calling mvn 'install', the bootable JAR artifact is attached to the project with the classifier 'bootable'. Use this parameter to
configure the classifier.

Type: java.lang.String
Required: No
User Property: bootable.jar.install.artifact.classifier
Default: bootable
Alias: install-artifact-classifier

layers
A list of Galleon layers to provision. Can be used when feature-pack-location or feature-packs are set.

Type: java.util.List
Required: No
Alias: layers

legacyPatchCleanUp
Deprecated. Set to true to enable patch cleanup. When cleanup is enabled, unused added modules, patched modules original
directories, unused overlay directories and .installation/patches directory are deleted.

Type: boolean
Required: No
Default: false
Alias: legacy-patch-clean-up

legacyPatchCliScript
Deprecated. Path to a CLI script that applies legacy patches. Content of such script should be composed of 'patch apply [path to zip
file] [patch apply options]' commands. Due to the nature of a bootable JAR trimmed with Galleon, part of the content of the patch
can be missing. In order to force the patch to apply use the '--override-all' option. The '--distribution' option is not needed, System
property 'jboss.home.dir' is automatically set to the server that will be packaged in the bootable JAR. If the script file is not
absolute, it has to be relative to the project base directory. NB: The server is patched with a legacy patch right after the server has
been provisioned with Galleon.

Type: java.lang.String
Required: No
Alias: legacy-patch-cli-script

logTime
Whether to log provisioning time at the end

Type: boolean
Required: No
Default: false
Alias: log-time

https://docs.wildfly.org/bootablejar/ 57/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

offline
Whether to use offline mode when the plugin resolves an artifact. In offline mode the plugin will only use the local Maven
repository for an artifact resolution.

Type: boolean
Required: No
Default: false
Alias: offline

outputFileName
By default the generated JAR is ${project.build.finalName}-bootable.jar

Type: java.lang.String
Required: No
User Property: wildfly.bootable.package.output.file.name
Alias: output-file-name

overriddenServerArtifacts
Deprecated. A list of artifacts that override the one referenced in the WildFly Galleon feature-pack used to build the Bootable JAR.
The artifacts present in this list must exist in the project dependencies (with a provided scope). GroupId and ArtifactId are
mandatory. Classifier is required if non null. Version and Type are optional and are retrieved from the project dependencies.
Dependencies on Galleon feature-pack can also be referenced from this list. zip type must be used for Galleon feature-packs. NB:
This configuration item can’t be used when Channels are in use.
Example of an override of the io.undertow:undertow-core artifact:
<overridden-server-artifacts>
<artifact>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</artifact>
</overridden-server-artifacts>

Type: java.util.List
Required: No
Alias: overridden-server-artifacts

pluginOptions
Arbitrary Galleon options used when provisioning the server. In case you are building a large amount of bootable JAR in the same
maven session, it is strongly advised to set 'jboss-fork-embedded' option to 'true' in order to fork Galleon provisioning and CLI
scripts execution in dedicated processes. For example:
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>

Type: java.util.Map
Required: No
Alias: plugin-options

projectBuildDir
Project build dir.

Type: java.lang.String
Required: No

https://docs.wildfly.org/bootablejar/ 58/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Default: ${project.build.directory}
provisioningFile
The path to the provisioning.xml file to use. Note that this cannot be used with the feature-packs or layers configuration
parameters. If the provisioning file is not absolute, it has to be relative to the project base directory.

Type: java.io.File
Required: No
User Property: wildfly.bootable.provisioning.file
Default: ${project.basedir}/galleon/provisioning.xml
Alias: provisioning-file

recordState
Whether to record provisioned state in .galleon directory.

Type: boolean
Required: No
Default: false
Alias: record-state

skip
Set to true if you want the deployment to be skipped, otherwise false .

Type: boolean
Required: No
User Property: wildfly.bootable.package.skip
Default: false

14.6. run
14.6.1. wildfly-jar:run
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:10.0.0.Final:run

14.6.2. Description
Run the bootable JAR. This is blocking.

14.6.3. Attributes
Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: runtime .

Table 5. Optional Parameters

Name Type Since Description

[arguments] List - Bootable JAR server arguments.


User property is: wildfly.bootable.arguments .

[jarFileName] String - In case a custom JAR file name was specified during build, set this option to this JAR file
name. That is required for the plugin to retrieve the JAR file to run.
User property is: wildfly.bootable.run.jar.file.name .
Alias is: jar-file-name .

https://docs.wildfly.org/bootablejar/ 59/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[jvmArguments] List - Additional JVM options.


User property is: wildfly.bootable.jvmArguments .

[skip] boolean - Set to true if you want the run goal to be skipped, otherwise false .
Default value is: false .
User property is: wildfly.bootable.run.skip .

14.6.4. Parameter Details


arguments
Bootable JAR server arguments.

Type: java.util.List
Required: No
User Property: wildfly.bootable.arguments

jarFileName
In case a custom JAR file name was specified during build, set this option to this JAR file name. That is required for the plugin to
retrieve the JAR file to run.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.run.jar.file.name
Alias: jar-file-name

jvmArguments
Additional JVM options.

Type: java.util.List
Required: No
User Property: wildfly.bootable.jvmArguments

skip
Set to true if you want the run goal to be skipped, otherwise false .

Type: boolean
Required: No
User Property: wildfly.bootable.run.skip
Default: false

14.7. shutdown
14.7.1. wildfly-jar:shutdown
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:10.0.0.Final:shutdown

14.7.2. Description
Shutdown the bootable JAR. In order to be able to shutdown a running server, the 'management' Galleon layer must have been
included. If that is not the case, the server would have to be killed.

14.7.3. Attributes
Requires a Maven project to be executed.

Table 6. Optional Parameters

https://docs.wildfly.org/bootablejar/ 60/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Name Type Since Description

[authenticationConfig] URL - A URL which points to the authentication configuration ( wildfly-


config.xml ) the client uses to authenticate with the server.
User property is: wildfly.authConfig .
Alias is: authentication-config .

[hostname] String - Specifies the host name of the server where the deployment plan should be
executed.
Default value is: localhost .
User property is: wildfly.hostname .

[id] String - Specifies the id of the server if the username and password is to be retrieved
from the settings.xml file
User property is: wildfly.id .

[password] String - Specifies the password to use if prompted to authenticate by the server. If no
password is specified and the server requests authentication the user will be
prompted to supply the password,
User property is: wildfly.password .

[port] int - Specifies the port number the server is listening on.
Default value is: 9990 .
User property is: wildfly.port .

[protocol] String - The protocol used to connect to the server for management.
User property is: wildfly.protocol .

[skip] boolean - Set to true if you want the shutdown goal to be skipped, otherwise * false .
Default value is: false .
User property is: wildfly.bootable.shutdown.skip .

[timeout] int - The timeout, in seconds, to wait for a management connection.


Default value is: 60 .
User property is: wildfly.timeout .

[username] String - Specifies the username to use if prompted to authenticate by the server. If no
username is specified and the server requests authentication the user will be
prompted to supply the username,
User property is: wildfly.username .

14.7.4. Parameter Details


authenticationConfig
A URL which points to the authentication configuration ( wildfly-config.xml ) the client uses to authenticate with the server.

Type: java.net.URL
Required: No
User Property: wildfly.authConfig
Alias: authentication-config

hostname
Specifies the host name of the server where the deployment plan should be executed.

Type: java.lang.String
Required: No

https://docs.wildfly.org/bootablejar/ 61/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

User Property: wildfly.hostname


Default: localhost
id
Specifies the id of the server if the username and password is to be retrieved from the settings.xml file

Type: java.lang.String
Required: No
User Property: wildfly.id

password
Specifies the password to use if prompted to authenticate by the server. If no password is specified and the server requests
authentication the user will be prompted to supply the password,

Type: java.lang.String
Required: No
User Property: wildfly.password

port
Specifies the port number the server is listening on.

Type: int
Required: No
User Property: wildfly.port
Default: 9990

protocol
The protocol used to connect to the server for management.

Type: java.lang.String
Required: No
User Property: wildfly.protocol

skip
Set to true if you want the shutdown goal to be skipped, otherwise * false .

Type: boolean
Required: No
User Property: wildfly.bootable.shutdown.skip
Default: false

timeout
The timeout, in seconds, to wait for a management connection.

Type: int
Required: No
User Property: wildfly.timeout
Default: 60

https://docs.wildfly.org/bootablejar/ 62/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

username
Specifies the username to use if prompted to authenticate by the server. If no username is specified and the server requests
authentication the user will be prompted to supply the username,

Type: java.lang.String
Required: No
User Property: wildfly.username

14.8. start
14.8.1. wildfly-jar:start
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:10.0.0.Final:start

14.8.2. Description
Start the bootable JAR. The plugin execution keeps the process running.

14.8.3. Attributes
Requires a Maven project to be executed.
Requires dependency resolution of artifacts in scope: runtime .

Table 7. Optional Parameters

Name Type Since Description

[arguments] List - Bootable JAR server arguments.


User property is: wildfly.bootable.arguments .

[authenticationConfig] URL - A URL which points to the authentication configuration ( wildfly-


config.xml ) the client uses to authenticate with the server.
User property is: wildfly.authConfig .
Alias is: authentication-config .

[checkStarted] boolean - Set to false if you don’t want the plugin to check for server status before to
return. In case the started server has no management interface enabled this
parameter should be set to true.
Default value is: true .
User property is: wildfly.bootable.start.check.start .
Alias is: check-server-start .

[hostname] String - Specifies the host name of the server where the deployment plan should be
executed.
Default value is: localhost .
User property is: wildfly.hostname .

[id] String - The Bootable JAR Process id.


Default value is: 60 .
User property is: wildfly.bootable.start.id .
Alias is: id .

[jarFileName] String - In case a custom JAR file name was specified during build, set this option to
this JAR file name. That is required for the plugin to retrieve the JAR file to
start.
User property is: wildfly.bootable.start.jar.file.name .
Alias is: jar-file-name .

https://docs.wildfly.org/bootablejar/ 63/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

[jvmArguments] List - Additional JVM options.


User property is: wildfly.bootable.jvmArguments .

[password] String - Specifies the password to use if prompted to authenticate by the server. If no
password is specified and the server requests authentication the user will be
prompted to supply the password,
User property is: wildfly.password .

[port] int - Specifies the port number the server is listening on.
Default value is: 9990 .
User property is: wildfly.port .

[protocol] String - The protocol used to connect to the server for management.
User property is: wildfly.protocol .

[skip] boolean - Set to true if you want the start goal to be skipped, otherwise false .
Default value is: false .
User property is: wildfly.bootable.start.skip .

[startupTimeout] long - The timeout value to use when checking for the server to be running.
Default value is: 60 .
User property is: wildfly.bootable.start.timeout .
Alias is: startup-timeout .

[stdout] String - Indicates how stdout and stderr should be handled for the server process.
A value of inherit means that the standard output streams are inherited
from the current process. Any other value is assumed to be a path. In this
case both stdout and stderr will be redirected to a file.
Default value is: ${project.build.directory}/wildfly-jar-start-
stdout.log .
User property is: wildfly.bootable.stdout .

[timeout] int - The timeout, in seconds, to wait for a management connection.


Default value is: 60 .
User property is: wildfly.timeout .

[username] String - Specifies the username to use if prompted to authenticate by the server. If no
username is specified and the server requests authentication the user will be
prompted to supply the username,
User property is: wildfly.username .

14.8.4. Parameter Details


arguments
Bootable JAR server arguments.

Type: java.util.List
Required: No
User Property: wildfly.bootable.arguments

authenticationConfig
A URL which points to the authentication configuration ( wildfly-config.xml ) the client uses to authenticate with the server.

Type: java.net.URL
Required: No

https://docs.wildfly.org/bootablejar/ 64/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

User Property: wildfly.authConfig


Alias: authentication-config
checkStarted
Set to false if you don’t want the plugin to check for server status before to return. In case the started server has no
management interface enabled this parameter should be set to true.

Type: boolean
Required: No
User Property: wildfly.bootable.start.check.start
Default: true
Alias: check-server-start

hostname
Specifies the host name of the server where the deployment plan should be executed.

Type: java.lang.String
Required: No
User Property: wildfly.hostname
Default: localhost

id
The Bootable JAR Process id.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.start.id
Default: 60
Alias: id

jarFileName
In case a custom JAR file name was specified during build, set this option to this JAR file name. That is required for the plugin to
retrieve the JAR file to start.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.start.jar.file.name
Alias: jar-file-name

jvmArguments
Additional JVM options.

Type: java.util.List
Required: No
User Property: wildfly.bootable.jvmArguments

password
Specifies the password to use if prompted to authenticate by the server. If no password is specified and the server requests
authentication the user will be prompted to supply the password,

Type: java.lang.String

https://docs.wildfly.org/bootablejar/ 65/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

Required: No
User Property: wildfly.password
port
Specifies the port number the server is listening on.

Type: int
Required: No
User Property: wildfly.port
Default: 9990

protocol
The protocol used to connect to the server for management.

Type: java.lang.String
Required: No
User Property: wildfly.protocol

skip
Set to true if you want the start goal to be skipped, otherwise false .

Type: boolean
Required: No
User Property: wildfly.bootable.start.skip
Default: false

startupTimeout
The timeout value to use when checking for the server to be running.

Type: long
Required: No
User Property: wildfly.bootable.start.timeout
Default: 60
Alias: startup-timeout

stdout
Indicates how stdout and stderr should be handled for the server process. A value of inherit means that the standard
output streams are inherited from the current process. Any other value is assumed to be a path. In this case both stdout and
stderr will be redirected to a file.

Type: java.lang.String
Required: No
User Property: wildfly.bootable.stdout
Default: ${project.build.directory}/wildfly-jar-start-stdout.log

timeout
The timeout, in seconds, to wait for a management connection.

Type: int
Required: No

https://docs.wildfly.org/bootablejar/ 66/67
2024. 03. 10. 10:12 WildFly Bootable JAR Documentation

User Property: wildfly.timeout


Default: 60
username
Specifies the username to use if prompted to authenticate by the server. If no username is specified and the server requests
authentication the user will be prompted to supply the username,

Type: java.lang.String
Required: No
User Property: wildfly.username
Version 10.0.0.Final
Last updated 2023-02-21 14:23:26 +0100

https://docs.wildfly.org/bootablejar/ 67/67

You might also like