WildFly Bootable JAR 3.0 is released!

The version 3.0 of the WildFly Bootable JAR Maven plugin has been released.

For people who are not familiar with WildFly Bootable JAR, I strongly recommend that you read this blog post that covers it in detail.

The new features that come in this release (in particular the dev-watch goal) have already been covered when announcing the Beta1 release. The Bootable JAR documentation contains a new chapter that provides details on the dev-watch goal.

Since Beta1, the Bootable JAR examples have been evolved to use WildFly 22.0.0.Final that has just been released.

In this blog post I will focus on the integration with Keycloak. This integration is now possible thanks to the Keycloak Galleon feature-pack that is new in Keycloak 12.0.0.

Keycloak Galleon feature-pack

The Keycloak Galleon feature-pack provides an OIDC client adapter by the means of a Galleon layer. The keycloak-client-oidc Galleon layer brings the OIDC keycloak subsystem (and associated JBoss modules) and configures the server security. For more information on the Keycloak Galleon feature-pack usage with WildFly, you can read the dedicated chapter in the WildFly documentation.

Using the Bootable JAR Maven plugin, you can combine layers coming from multiple Galleon feature-packs.

In your plugin configuration it looks like:

<configuration>
  <feature-packs>
    <feature-pack>
      <location>wildfly@maven(org.jboss.universe:community-universe)</location>
    </feature-pack>
    <feature-pack>
       <location>org.keycloak:keycloak-adapter-galleon-pack:12.0.1</location>
     </feature-pack>
  </feature-packs>
  <layers>
    <layer>web-server</layer>
     <layer>keycloak-client-oidc</layer>
  </layers>
...
</configuration>

You will notice that the <location> element is structured differently for the WildFly feature-pack and the Keycloak one.

The WildFly feature-pack is accessible from the Galleon community-universe. Retrieving the WildFly feature-pack from this universe allows us to not specify any version and get the latest one.

Since the Keycloak Galleon feature-pack is not registered inside an universe, you need to specify its Maven coordinates.

When building a Bootable JAR, the plugin retrieves the feature-packs from Maven repositories and provisions a server based on the set of Galleon layers.

You can follow the steps documented in this example to secure a servlet deployed inside a Bootable JAR using Keycloak.

Developing on OpenShift with Bootable JAR

We are currently working at defining ODO dev files in order to make for a smooth and efficient development experience on OpenShift. Changes done in your local Maven project fire automatic re-build and re-deploy of your application in the remote OpenShift cluster POD.

To achieve this, we are leveraging the ODO source watching capabilities to push changes onto your OpenShift POD. dev-watch goal, that is running in the POD, takes over and automatically re-build/re-deploy your application.

Stay tuned!

Known issues

We have encountered an issue when using the dev-watch goal with the WildFly microprofile-* quickstarts. You need to upgrade the plugin to 3.0.2.Final to allow for dev-watch to properly operate. The Maven command to use is: mvn wildfly-jar:dev-watch -Pbootable-jar -Dversion.wildfly-jar.maven.plugin=3.0.2.Final

To conclude

If you have an interesting use-case, simple enough to be reduced to a simple example, and it is not covered by the examples, then feel free to contribute one. We will be very happy to help you integrate your example in the project. Just ask!

Finally we would really appreciate that you keep us posted with your feedback and new requirements (that you can log as new project issues), this will help evolve the WildFly Bootable JAR experience in the right direction.

Thank-you!

JF Denise