Here is an short example to get you started: Code Block Placeholder |
---|
code-language | HTML and XML |
---|
| <profiles>
<profile>
<id>attach</id>
<properties>
<attach.archive>true</attach.archive>
</properties>
<build>
<plugins>
<plugin>
<groupId>${project-group-id}</groupId>
<artifactId>${project-artifact-id}</artifactId>
<version>${project-version}</version>
<executions>
<execution>
<id>create-modules-archive</id>
<goals>
<goal>create-modules-archive</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<slotStrategy>main</slotStrategy>
<defaultSlot>my-product</defaultSlot>
<attach>${attach.archive}</attach>
<dependencyExcludes>
<exclude>
<groupId>com\.sun</groupId>
<artifactId>tools</artifactId>
</exclude>
<exclude>
<groupId>system</groupId>
</exclude>
</dependencyExcludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles> |
Module descriptors are stored in XML files that adhere to the smartics JBoss Modules XSD. Per default they are stored at Code Block Placeholder |
---|
| src/etc/jboss-modules
src/main/config/jboss-modules
src/main/resources/META-INF/jboss-modules |
The locations to search modules XML documents is configurable via the System Link |
---|
file | create-modules-archive-mojo.html#modules |
---|
system-type | site |
---|
label | modules |
---|
| property. Please refer to this property for more information on this topic.A modules XML looks like this: Code Block Placeholder |
---|
code-language | HTML and XML |
---|
| <modules xmlns="http://smartics.de/ns/jboss-modules-descriptor/1">
<module name="org.apache.commons.configuration">
<match>
<includes>
<include>
<artifactId>commons-configuration</artifactId>
</include>
</includes>
</match>
<apply-to-dependencies>
<dependencies>
<match>
<includes>
<include>.+</include>
</includes>
<excludes>
<exclude>org.apache.commons..+</exclude>
</excludes>
</match>
<apply>
<export>true</export>
</apply>
</dependencies>
</apply-to-dependencies>
</module>
<module name="org.apache.commons.$1">
<match>
<includes>
<include>
<artifactId>commons-(.*)</artifactId>
</include>
</includes>
</match>
</module>
</modules> |
The example shows only one module descriptor, but you may add any number of module elements to the list. |