Skip to content

Commit

Permalink
start using wildfly plugin to customize a out of box wildfly
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli committed Feb 20, 2015
1 parent dbf6cd6 commit 4f3843a
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 521 deletions.
90 changes: 86 additions & 4 deletions hawkular-nest/hawkular-nest-distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<inceptionYear>2015</inceptionYear>

<properties>
<wildfly.dist.zip.root.dir>wildfly-${version.org.wildfly}</wildfly.dist.zip.root.dir>
<assembly.dir>${project.build.directory}/assembly</assembly.dir>
<checkstyle.suppressions.file>${basedir}/src/main/scripts/checkstyle-suppressions.xml</checkstyle.suppressions.file>
</properties>

Expand Down Expand Up @@ -68,28 +70,108 @@
<build>

<plugins>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<exclude>src/main/scripts/subsystem*.xml</exclude>
<exclude>src/main/scripts/socketbinding*.xml</exclude>
</excludes>
</configuration>
</plugin>

<!-- unpack the wildfly distribution and copy our hawkular modules in a tmp location -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-wildfly</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${assembly.dir}</outputDirectory>
<includeArtifactIds>wildfly-dist</includeArtifactIds>
<excludes>*/appclient/**,*/docs/**,*/domain/**</excludes>
</configuration>
</execution>
<execution>
<id>copy-hawkular-modules</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/hawkular-modules</outputDirectory>
<includeArtifactIds>
hawkular-nest-wf-extension,
hawkular-bus-broker-wf-extension,
hawkular-bus-ra-wf-module
</includeArtifactIds>
<stripVersion>true</stripVersion>
<stripClassifier>true</stripClassifier>
<overWriteIfNew>true</overWriteIfNew>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>

<!-- put some custom files in the out-of-box wildfly we unpacked above -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-distro-resources</id>
<phase>validate</phase>
<id>copy-distro-resources-to-wildfly</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/distro-resources</outputDirectory>
<outputDirectory>${assembly.dir}/${wildfly.dist.zip.root.dir}</outputDirectory>
<resources>
<resource>
<directory>src/main/distro-resources</directory>
<filtering>false</filtering> <!-- let the assembly filter if it wants -->
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<!-- install our hawkular extension modules and customize standalone.xml -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-extension-maven-plugin</artifactId>
<executions>
<execution>
<id>install-bus-broker-module</id>
<phase>prepare-package</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<jbossHome>${assembly.dir}/${wildfly.dist.zip.root.dir}</jbossHome>
<serverConfig>standalone/configuration/standalone.xml</serverConfig>
<modulesHome>modules/system/layers/base</modulesHome>
<moduleZip>${project.build.directory}/hawkular-modules/hawkular-bus-broker-wf-extension.zip</moduleZip>
<subsystem>${basedir}/src/main/scripts/subsystem-hawkular-bus-broker-wf-extension.xml</subsystem>
<socketBinding>${basedir}/src/main/scripts/socketbinding-hawkular-bus-broker-wf-extension.xml</socketBinding>
<edit>
<insert>
<select>/server/socket-binding-group[@name='standard-sockets']</select>
<xml><![CDATA[<socket-binding name="org.hawkular.bus.broker.discovery" port="0" mulicast-address="224.0.0.4" multicast-port="63636"/>]]></xml>
<attribute>org.hawkular.bus.broker.discovery</attribute>
</insert>
</edit>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
Expand Down
Loading

0 comments on commit 4f3843a

Please sign in to comment.