WildFly Swarm Alpha2

We’ve been churning through the improvements and fixes for Alpha2!


All the Windows issues are now resolved. You can enjoy the benefits of WildFly Swarm on your operating system of choice.

Modify your Application from Alpha1

We’ve made a few changes to how the plugin works which means that you will need to update any applications that are already utilizing Alpha1:

  • Remove the execution phase from the wildfly-swarm-plugin

  • Change the goal of the wildfly-swarm-plugin from create to package

  • Remove the provided scope from all WildFly Swarm dependencies in your pom.xml

Weld and JAX-RS

There were some WildFly modules missing when you wanted to use Weld with JAX-RS, so we’ve created a new fraction to cater for this combination. Simply add the following dependency:



This release brings initial support for JPA projects. There are improvements planned for Alpha3 to make it even easier, but right now your project needs to have jar packaging, not war, and you will need your own Main:

public class Main {

    public static void main(String[] args) throws Exception {
      Container container = new Container();

      // Create a JDBC driver deployment using maven groupId:artifactId
      // The version is resolved from your pom.xml's <dependency>
      DriverDeployment driverDeployment = new DriverDeployment(container, "com.h2database:h2", "h2");

      // Create a DS deployment
      DatasourceDeployment dsDeployment = new DatasourceDeployment(container, new Datasource("ExampleDS")
              .authentication("sa", "sa")

      // Create the WAR and bundle all the JPA Entities and persistence.xml
      WarDeployment deployment = new DefaultWarDeployment(container);
      deployment.getArchive().addAsWebInfResource(new ClassLoaderAsset("META-INF/persistence.xml", Main.class.getClassLoader()), "classes/META-INF/persistence.xml");
      deployment.getArchive().addAsWebInfResource(new ClassLoaderAsset("META-INF/load.sql", Main.class.getClassLoader()), "classes/META-INF/load.sql");


More ways to run your WildFly Swarm Application!

As with Alpha1 you can run your generated self-contained executable with:

java -jar ./target/myproject-1.0-swarm.jar

With Alpha2 you can also run it from the command line, without building the project:

mvn wildfly-swarm:run

or run the Main class of your application, or org.wildfly.swarm.Swarm if you don’t have one, directly within your favorite IDE!

What do I download?

There is no special download or installation instructions. Simply start using org.wildfly.swarm artifacts in your pom.xml, throw in the plugin and continue doing your builds. Everything is available through Maven Central.

Stay in Touch

You can keep up with the project through the WildFly HipChat room, @wildflyswarm on Twitter, or through GitHub Issues.