© 2019 The original authors.
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.
2. Examples
The examples directory 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 example.
Some of these examples are targeting deployment of the bootable JAR in OpenShift. For example: microprofile-config, postgresql and jkube.
2.1. Downloading the examples
-
Clone the wildfly-jar-maven-plugin repository: git clone -b 11.0.2.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.
3. Composing custom server with Galleon layers
When building a bootable JAR you have the ability to select the set of WildFly Galleon 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, you can combine other third parties Galleon layers compatible with WildFly (eg: WildFly database drivers and datasources layers). The example 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 32 server:
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#32.0.0.Final</feature-pack-location>
-
To provision the latest WildFly server:
<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 32 and WildFly extras datasources you would provide:
<feature-packs>
<feature-pack>
<location>wildfly@maven(org.jboss.universe:community-universe)#32.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.
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:
<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:
<excluded-layers>
<layer>deployment-scanner</layer>
</excluded-layers>
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.
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 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.
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 scripts (see 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 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
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.
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
composed of:cli-session
-
: the list of paths to script files .<script-files>
-
: (optional) a path to a properties file that contains java properties that scripts can reference (using the syntaxproperties-file
). For example, a command that sets the public inet-address to the value of${my.prop}
system property looks like:all.addresses
/interface=public:write-attribute(name=inet-address,value=${all.addresses})
-
: (optional) a boolean indicating if system properties or expressions are resolved before sending the operation requests to the server. Value isresolve-expressions
by default.true
All scripts present in a
are executed within a single CLI execution. An embedded server is started for each defined cli-session
.cli-session
NB: The scripts are executed in the order they are defined in the plugin configuration.
CLI configuration example:
<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>
7. Configuring the server for cloud execution
The configuration item
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 <cloud></cloud>
to select the targeted cloud platform.<type>openshift|kubernetes</type>
The sever configuration is updated in order to properly operate in a cloud environment:
-
If no Galleon layers are provisioned, the provisioned configuration is
instead ofstandalone-microprofile-ha.xml
.standalone-microprofile.xml
-
The
(ormicroprofile-health
layer if the WildFly Galleon feature-pack doesn’t definehealth
layer) andmicroprofile-health
(that contains WildFly CLI) Galleon layers are provisioned. They are required for the OpenShift probes and WildFly OpenShift Operator to properly operate.core-tools
-
The public and private inet addresses are bound to the value of the
environment variable if defined (defined in OpenShift PODS).HOSTNAME
-
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.tx.node.id
-
The
system property, if not set, is set to the value ofjboss.tx.node.id
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.HOSTNAME
-
The
system property, if not set, is set to the value ofjboss.node.name
environment variable if defined (defined in OpenShift PODS).HOSTNAME
-
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
child element<cloud>
to enable authentication. NB: When authentication is enabled, the environment variable<enable-jgroups-password>true|false</enable-jgroups-password>
must be set.JGROUPS_CLUSTER_PASSWORD
Some examples:
Configure for OpenShift execution:
<cloud/>
Configure for OpenShift execution with jgroups authentication enabled:
<cloud>
<enable-jgroups-password>true</enable-jgroups-password>
</cloud>
Configure for kubernetes execution:
<cloud>
<type>kubernetes</type>
</cloud>
7.1. OpenShift Deployment using Eclipse JKube
JKube Maven plugin contains support for WildFly bootable JAR. The 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
its installation path.
This information is required by the WildFly OpenShift Operator to retrieve transaction logs and call into WildFly CLI./opt/jboss/container/wildfly-bootable-jar/install-dir
When deploying WildFly bootable JAR using openjdk image it is strongly advised to set `GC_METASPACE_SIZE=96 `environment variable.
|
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
file)./opt/jboss/container/wildfly-bootable-jar/install-dir
NB: Configuration changes are not persisted. Once the server is killed, management updates are lost.
9. Other Maven plugin goals
In addition the main package goal used to build a bootable JAR, the following goals are available:
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.
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
andejb
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.
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!
/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:
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
-
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.
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:
<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
docker image to run a bootable JAR, you must set the following env variables to enable debug:registry.redhat.io/ubi8/openjdk-11
-
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
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:
<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:
<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 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. WildFly Channel yaml files URL and/or Maven Coordinates
(version being optional) can be set thanks to the <channels>
configuration item.
<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:
<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:
-
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.
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
environment variable.MAVEN_OPTS="-XX:MaxMetaspaceSize=<value>"
-
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>
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
<dependency>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<version>11.0.2.Final</version>
</dependency>
14.1. Goals overview
Build and start a WildFly bootable JAR for dev mode. |
|
Prints help for the plugin. |
|
Build a WildFly bootable JAR. |
|
Run a WildFly bootable JAR (blocking). |
|
Shutdown a WildFly bootable JAR. |
|
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:11.0.2.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:
compile
.
Name |
Type |
Since |
Description |
|
|
Bootable JAR server arguments. |
|
|
|
Overrides the default |
|
|
|
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. |
|
|
|
+
User property is: |
|
|
|
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: |
|
|
|
To enable cloud support. When cloud support is enabled, the created
bootable JAR will operate properly in context such as openshift.
|
|
|
|
To make the WAR deployment registered under root resource path
('/'). |
|
|
|
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. |
|
|
|
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. |
|
|
|
Deprecated. Set this parameter to true in order to retrieve the set
of artifacts that can be upgraded. The file
|
|
|
|
A list of Galleon layers to exclude. Can be used when
feature-pack-location or feature-packs are set. |
|
|
|
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. |
|
|
|
The WildFly Galleon feature-pack location to use if no
provisioning.xml file found. Can’t be used in conjunction with
feature-packs. |
|
|
|
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. |
|
|
|
Hollow JAR. Create a bootable JAR that doesn’t contain application. |
|
|
|
When calling mvn 'install', the bootable JAR artifact is attached
to the project with the classifier 'bootable'. Use this parameter
to configure the classifier. |
|
|
|
Additional JVM options. |
|
|
|
A list of Galleon layers to provision. Can be used when
feature-pack-location or feature-packs are set. |
|
|
|
Whether to log provisioning time at the end |
|
|
|
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. |
|
|
|
By default the generated JAR is
${project.build.finalName}-bootable.jar |
|
|
|
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 |
|
|
|
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: |
|
|
|
Project build dir. |
|
|
|
The path to the |
|
|
|
Whether to record provisioned state in .galleon directory. |
|
|
|
Set to |
|
|
|
Indicates how |
14.2.4. Parameter Details
-
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
-
Type:
java.util.List
-
Required:
No
-
User Property:
wildfly.channels
-
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
-
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
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
-
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
-
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
-
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
-
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
-
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
-
Type:
boolean
-
Required:
No
-
Default:
false
-
Alias:
record-state
-
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 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:11.0.2.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:
compile
.
Name |
Type |
Since |
Description |
|
|
Bootable JAR server arguments. |
|
|
|
Overrides the default |
|
|
|
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. |
|
|
|
+
User property is: |
|
|
|
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: |
|
|
|
To enable cloud support. When cloud support is enabled, the created
bootable JAR will operate properly in context such as openshift.
|
|
|
|
To make the WAR deployment registered under root resource path
('/'). |
|
|
|
Enable/Disable debug. If debugger is explicitly enabled in JVM
arguments, this option has no effect, |
|
|
|
Debug port. |
|
|
|
Debug suspend. |
|
|
|
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. |
|
|
|
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. |
|
|
|
Deprecated. Set this parameter to true in order to retrieve the set
of artifacts that can be upgraded. The file
|
|
|
|
A list of Galleon layers to exclude. Can be used when
feature-pack-location or feature-packs are set. |
|
|
|
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. |
|
|
|
The WildFly Galleon feature-pack location to use if no
provisioning.xml file found. Can’t be used in conjunction with
feature-packs. |
|
|
|
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. |
|
|
|
Hollow JAR. Create a bootable JAR that doesn’t contain application. |
|
|
|
Specifies the host name of the server where the deployment plan
should be executed. |
|
|
|
File patterns that we should ignore during watch. Hidden files and
files ending with '~' are ignored. You can set the system property
|
|
|
|
When calling mvn 'install', the bootable JAR artifact is attached
to the project with the classifier 'bootable'. Use this parameter
to configure the classifier. |
|
|
|
Additional JVM options. |
|
|
|
A list of Galleon layers to provision. Can be used when
feature-pack-location or feature-packs are set. |
|
|
|
Whether to log provisioning time at the end |
|
|
|
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. |
|
|
|
By default the generated JAR is
${project.build.finalName}-bootable.jar |
|
|
|
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 |
|
|
|
Remote connection password. |
|
|
|
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: |
|
|
|
Specifies the port number the server is listening on. |
|
|
|
Project build dir. |
|
|
|
Remote connection protocol. |
|
|
|
The path to the |
|
|
|
Whether to record provisioned state in .galleon directory. |
|
|
|
Enable/Disable remote connection. |
|
|
|
Set to |
|
|
|
(no description) |
|
|
|
The timeout, in seconds, to wait for a management connection. |
|
|
|
Remote connection username. |
|
|
|
Additional extensions of files located in |
14.3.4. Parameter Details
-
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
-
Type:
java.util.List
-
Required:
No
-
User Property:
wildfly.channels
-
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
-
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
-
Type:
int
-
Required:
No
-
User Property:
wildfly.bootable.debug.port
-
Default:
8787
-
Alias:
debug-port
-
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.
-
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
-
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
-
Type:
boolean
-
Required:
No
-
User Property:
wildfly.bootable.hollow
-
Alias:
hollow-jar
-
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
-
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
-
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
-
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
-
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
-
Type:
int
-
Required:
No
-
User Property:
wildfly.port
-
Default:
9990
-
Type:
java.lang.String
-
Required:
No
-
Default:
${project.build.directory}
-
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
-
Type:
boolean
-
Required:
No
-
Default:
false
-
Alias:
record-state
-
Type:
boolean
-
Required:
No
-
User Property:
wildfly.bootable.remote
-
Default:
false
-
Type:
boolean
-
Required:
No
-
User Property:
wildfly.bootable.package.skip
-
Default:
false
-
Type:
java.io.File
-
Required:
No
-
Default:
${project.build.sourceDirectory}
-
Type:
int
-
Required:
No
-
User Property:
wildfly.timeout
-
Default:
60
-
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:11.0.2.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.
Name |
Type |
Since |
Description |
|
|
If |
|
|
|
The name of the goal for which to show help. If unspecified, all
goals will be displayed. |
|
|
|
The number of spaces per indentation level, should be positive. |
|
|
|
The maximum length of a display line, should be positive. |
14.4.4. Parameter Details
-
Type:
boolean
-
Required:
No
-
User Property:
detail
-
Default:
false
-
Type:
java.lang.String
-
Required:
No
-
User Property:
goal
-
Type:
int
-
Required:
No
-
User Property:
indentSize
-
Default:
2
-
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:11.0.2.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:
package
.
Name |
Type |
Since |
Description |
|
|
Overrides the default |
|
|
|
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. |
|
|
|
+
User property is: |
|
|
|
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: |
|
|
|
To enable cloud support. When cloud support is enabled, the created
bootable JAR will operate properly in context such as openshift.
|
|
|
|
To make the WAR deployment registered under root resource path
('/'). |
|
|
|
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. |
|
|
|
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. |
|
|
|
Deprecated. Set this parameter to true in order to retrieve the set
of artifacts that can be upgraded. The file
|
|
|
|
A list of Galleon layers to exclude. Can be used when
feature-pack-location or feature-packs are set. |
|
|
|
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. |
|
|
|
The WildFly Galleon feature-pack location to use if no
provisioning.xml file found. Can’t be used in conjunction with
feature-packs. |
|
|
|
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. |
|
|
|
Hollow JAR. Create a bootable JAR that doesn’t contain application. |
|
|
|
When calling mvn 'install', the bootable JAR artifact is attached
to the project with the classifier 'bootable'. Use this parameter
to configure the classifier. |
|
|
|
A list of Galleon layers to provision. Can be used when
feature-pack-location or feature-packs are set. |
|
|
|
Whether to log provisioning time at the end |
|
|
|
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. |
|
|
|
By default the generated JAR is
${project.build.finalName}-bootable.jar |
|
|
|
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 |
|
|
|
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: |
|
|
|
Project build dir. |
|
|
|
The path to the |
|
|
|
Whether to record provisioned state in .galleon directory. |
|
|
|
Set to |
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
-
Type:
java.util.List
-
Required:
No
-
User Property:
wildfly.channels
-
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
-
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
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
-
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
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
-
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
-
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
-
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
-
Type:
boolean
-
Required:
No
-
Default:
false
-
Alias:
record-state
-
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:11.0.2.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
.
Name |
Type |
Since |
Description |
|
|
Bootable JAR server arguments. |
|
|
|
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. |
|
|
|
Additional JVM options. |
|
|
|
Set to |
14.6.4. Parameter Details
-
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
-
Type:
java.util.List
-
Required:
No
-
User Property:
wildfly.bootable.jvmArguments
-
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:11.0.2.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.
Name |
Type |
Since |
Description |
|
|
A URL which points to the authentication configuration
( |
|
|
|
Specifies the host name of the server where the deployment plan
should be executed. |
|
|
|
Specifies the id of the server if the username and password is to
be retrieved from the settings.xml file |
|
|
|
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, |
|
|
|
Specifies the port number the server is listening on. |
|
|
|
The protocol used to connect to the server for management. |
|
|
|
Set to |
|
|
|
The timeout, in seconds, to wait for a management connection. |
|
|
|
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, |
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
-
Type:
java.lang.String
-
Required:
No
-
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
-
Type:
int
-
Required:
No
-
User Property:
wildfly.port
-
Default:
9990
-
Type:
java.lang.String
-
Required:
No
-
User Property:
wildfly.protocol
-
Type:
boolean
-
Required:
No
-
User Property:
wildfly.bootable.shutdown.skip
-
Default:
false
-
Type:
int
-
Required:
No
-
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
14.8. start
14.8.1. wildfly-jar:start
Full name: org.wildfly.plugins:wildfly-jar-maven-plugin:11.0.2.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
.
Name |
Type |
Since |
Description |
|
|
Bootable JAR server arguments. |
|
|
|
A URL which points to the authentication configuration
( |
|
|
|
Set to |
|
|
|
Specifies the host name of the server where the deployment plan
should be executed. |
|
|
|
The Bootable JAR Process id. |
|
|
|
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. |
|
|
|
Additional JVM options. |
|
|
|
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, |
|
|
|
Specifies the port number the server is listening on. |
|
|
|
The protocol used to connect to the server for management. |
|
|
|
Set to |
|
|
|
The timeout value to use when checking for the server to be
running. |
|
|
|
Indicates how |
|
|
|
The timeout, in seconds, to wait for a management connection. |
|
|
|
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, |
14.8.4. Parameter Details
-
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
-
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
-
Type:
java.lang.String
-
Required:
No
-
User Property:
wildfly.hostname
-
Default:
localhost
-
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
-
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
-
Required:
No
-
User Property:
wildfly.password
-
Type:
int
-
Required:
No
-
User Property:
wildfly.port
-
Default:
9990
-
Type:
java.lang.String
-
Required:
No
-
User Property:
wildfly.protocol
-
Type:
boolean
-
Required:
No
-
User Property:
wildfly.bootable.start.skip
-
Default:
false
-
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
-
Type:
int
-
Required:
No
-
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