Innovative microservice packaging with WildFly Swarm
WildFly Swarm is a WildFly extension project that aims to facilitate Java EE applications with minimum dependencies in the form of an executable JAR, called Uberjar
or flat-jar
. This JAR is deployed on an embedded container derived from the WildFly application server. WildFly Swarm is an initiative around the microprofile that aims to optimize Enterprise Java for a microservices architecture.
To create a flat-jar
from a web application, you simply have to use the WildFly Swarm Maven
plugin to package your web application:
<plugin> <groupId>org.wildfly.swarm</groupId> <artifactId>wildfly-swarm-plugin</artifactId> <version>${version.wildfly.swarm}</version> <executions> <execution> <goals> <goal>package</goal> </goals> </execution> </executions> </plugin>
The plugin autodetects dependencies (fractions) for your project and includes all the requirements...