About
WildFly Swarm is a framework for building enterprise Java microservices. By deconstructing the WildFly Application Server into finer-grained components, applications can be designed to make use of only the enterprise Java EE APIs they need and reduce your time to market.
In this cheat sheet, learn how to:
- Develop a WildFly Swarm application
- Customize the runtime
- Configure a WildFly Swarm application
- Add fractions to a WildFly Swarm application
Follow Red Hat’s Andrew Block step-by-step guidance to WildFly Swarm.
Excerpt
Swarmtool is a standalone jar that can be used to convert an existing jar or war into a swarm application without requiring any other tooling. Existing projects can be run as WildFly Swarm applications in three steps:
1. Download Swarmtool
Swarmtool is available for download in Maven Central by matching the WildFly Swarm version that is referenced in your application’s pom.xml file:
curl -O https://repo1.maven.org/maven2/org/wildfly/swarm/swarmtool/<WILDFLY_SWARM_ VERSION>/swarmtool-<WILDFLY_SWARM_VERSION>-standalone.jar
2. Determine options to apply (see table below and apply any option as necessary.)
3. Execute the swarm tool jar via the command line Since the swarmtool jar is executable, it can be renamed to a value which is easier to execute, such as swarmtool. The following command can then be executed:
swarmtool <options> <artifact>
Alternatively, it can be executed using java -jar
swarmtool <options> <artifact>