WildFly Swarm Logo

Rightsize Your Services

Fork me on GitHub

Swarm offers an innovative approach to packaging and running JavaEE applications by packaging them with just enough of the platform to "java -jar" your application. However, it's all much, much cooler than that ...

Foo

Features and Benefits

Mature

Develop services using the feature richness and maturity of the enterprise Java industry standard - JavaEE

Flexible

Simply specify WildFly Swarm maven dependencies to bundle just the parts of the JavaEE 7 WildFly application server that you need. Don't use EJBs or JPA? Great, nothing is bundled unless you specify it!

Straightforward

Generate uberjar (Ex: java -jar MyApp.jar), or generate a .war and deploy to any JavaEE compatible application server.

Service Oriented

Use built-in service discovery, or use external service registries. You choose.

Practical

Built-in support for third party apps and frameworks like Logstash and NetFlix OSS projects like Hystrix and Ribbon.

Integrated

Integrates with upstream Red Hat projects for single sign-on KeyCloak, monitoring Hawkular, data grid InfiniSpan, and more broadly, Platform as a Service OpenShift.

Example

Using WildFly swarm is easy! Add dependencies for just the parts of WildFly that you need. The following example assumes a simple JAX-RS RESTful application.

<dependency>
  <groupId>org.wildfly.swarm</groupId>
  <artifactId>wildfly-swarm-jaxrs</artifactId>
</dependency>

To create an uberjar, configure the plugin:

<plugin>
  <groupId>org.wildfly.swarm</groupId>
  <artifactId>wildfly-swarm-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>package</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Deploy the generated .war to any JavaEE compatible application server, or run the uberjar:

java -jar MyApp.jar

More Examples