This project defines a Maven plugin to build WildFly bootable JAR (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
To get the list of the startup arguments:
java -jar target/myapp-bootable.jar --help
A WildFly bootable JAR behave in a way that is similar to a WildFly server installed on file system:
Some limitations exist:
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.
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 examples are targeting OpenShift deployment, for example:
The jkube example shows how to make use of the Eclipse JKube Maven plugin.
The microprofile-config and postgresql examples show how to use the OpenShift 'oc' command to deploy a bootable JAR on OpenShift.
jib example shows how to deploy a bootable JAR inside a JIB container.
mvn clean install -DskipTests