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:
Setup your build:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
... | |
<plugin> | |
<groupId>org.jboss.plugins</groupId> | |
<artifactId>wildfly-extension-maven-plugin</artifactId> | |
<version>${version.wildfly-extension-maven-plugin}</version> | |
<configuration> | |
<!-- required: --> | |
<moduleZip>${project.build.directory}/module.zip</moduleZip> | |
<!-- required: WF home --> | |
<jbossHome>/jboss/wildfly-8.1.0.Final</jbossHome> | |
<!-- optional: standalone.xml or domain.xml --> | |
<serverConfig>standalone/configuration/standalone-full.xml</serverConfig> | |
<!-- optional: configuration of subystem --> | |
<subsystem>src/main/resources/standalone-subsystem.xml</subsystem> | |
<!-- optional: socket-binding configuration --> | |
<socketBinding>src/main/resource/socket-binding.xml</socketBinding> | |
</configuration> | |
<!-- uncomment this piece if you wish to activate plugin any time you run install goal | |
<executions> | |
<execution> | |
<id>build-dist</id> | |
<phase>install</phase> | |
<goals> | |
<goal>deploy</goal> | |
</goals> | |
</execution> | |
</executions> | |
--> | |
</plugin> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<socket-binding name="your binding name" <!-- binding attributes --> /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<subsystem xmlns="your namespace"> | |
<!-- subsystem specific content --> | |
</subsystem> |
Run plugin:
mvn wildfly-extension:deploy
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
Žádné komentáře:
Okomentovat