WildFly Bootable JAR 3.0.0.Beta1 is released!
The 3.0.0.Beta1 version of the WildFly bootable JAR Maven plugin has been released.
This release is not yet Final, it is "just a beta", but we think that it is of enough good quality to acquire feedback on it.
For people who are not familiar with WildFly bootable JAR, I strongly recommend that you read this blog post that covers it in details.
In addition to bug fixes, this release brings 2 new goals:
-
help
: to display the plugin goals and configuration elements descriptions. -
dev-watch
: an evolution of thedev
goal that makes repackaging of your application no more required.
Dev-watch goal
The current dev
goal, although offering an efficient workflow to develop WildFly applications, requires an explicit repackaging of your application.
This is currently done in two steps:
-
mvn wildfly-jar:dev
-
that builds and starts the server in background. The deployment scanner monitors the
target/deployments
directory for new deployed content.
-
-
mvn package -Ddev
-
that builds your application then copy the deployment to the
target/deployments
directory.
-
-
Update your src, re-call
mvn package -Ddev
-
When done call
mvn wildfly-jar:shutdown
-
that kills the running server (NB: requires the
management
layer to be provisioned).
-
So each time a change is made to your application, mvn package -Ddev
must be called for the deployment to be re-deployed.
Furthermore, when the plugin configuration located in the pom.xml file is modified (e.g.: a new Galleon layer is added),
when a CLI script is updated or when some extra content is added, the running server must be killed and wildfly-jar:dev
must then be re-called.
This knowledge of when to re-build a bootable JAR, when to stop/re-start it, when to re-build your sources and when to re-deploy
is now under the control of the dev-watch
goal.
The new workflow introduced by the goal is:
-
mvn wildfly-jar:dev-watch
-
that builds your application (if needed), builds and starts the server, deploys your application and finally watches for file changes in your project.
-
Note that this call is blocking. The
dev-watch
goal and the server write traces to the console.
-
-
Update your files.
-
changes are detected. The goal advertises in the console what is the action it is taking (re-build, re-deploy, …).
-
-
Refresh your browser (if needed) to access the re-deployed application.
-
When done, send
Ctrl-C
in the shell.
Integration in IDE is straightforward. As an example I have created a Maven action named 'dev-watch' that calls wildfly-jar:dev-watch
goal in NetBeans IDE. Once called, the goal traces are displayed in the IDE output windows. You can then forget
about the execution and start modifying your files in the IDE and refresh your web browser to visualize changes.
New Examples
We have added some new examples:
-
An example that shows how to use the webservices Galleon layer.
-
An example that shows how to integrate the Maven plugin from Graddle.
-
An example that shows how to deploy activemq rar file and use the ejb Galleon layer.
Plugin configuration changes
We have fixed the extraServerContent
configuration element to be extraServerContentDirs
. That was required to align
its name with the extra-server-content-dirs
alias. If you are already using extra-server-content-dirs
(that is the advised way),
then nothing change for you, if you are using extraServerContent
, you will have to update your pom file.
To conclude
We hope that you are seeing the benefits of the new features that this release is bringing.
We would really appreciate your feedback on the dev-watch
goal. We aim toward a smooth and efficient
first class WildFly developer experience and we need you there!
Thank-you.
JF Denise