pátek 31. října 2014

Wildfly Extension Installer - maven plugin

I recently started to play with RHQ Metrics, especially WildFly Monitor subsystem. One thing I found annoying was copying over module to WildFly and registering it as server extension. As WildFly does not (yet) support adding extensions at runtime, I decided to write a maven plugin for it.

Plugin features

  • Install module - this is an easy one.Plugin requires a module zip file and just extracts it into your WF home.
  • Register extension - your module gets automatically added among server extensions
  • Register subsystem - if you supply subsystem xml file, plugin puts it's content to right place
  • Register socket-binding - if your subsystem requires to set socket binding and you supply socket-binding xml file, plugin puts it's content to right place
  • Support for domain.xml - all above applies to domain.xml as well, for subsystem and socket-bindings you just need to provide wich profiles and socket-binding-groups to affect.

Example usage

Prepare your module.zip (ie. using maven-assembly-plugin) see for example pom.xml and module-assembly.xml from wildfly-monitor project.

Setup your build:

Run plugin:
mvn wildfly-extension:deploy
For more details take a look at the plugin documentation.

Possible future enhancements

  • Restart server - plugin could optionally restart WildFly server after it has installed module and registered all stuff
  • Extract module only - add option to extract module without registering an extension
  • Assemble module - based on configuration and maven depenencies, plugin could generate module.xml and collect all required jars or directories
  • Add a way to uninstall module and extension from WildFly server

Ideas welcome!


If you'd like to contribute, check out source code.

Žádné komentáře: