The runtime assembly plugin is used to provision a runtime image as part of an automated, reproducible Maven build process. The plugin downloads and provisions the Fabric3 standalone runtime and extensions. In addition, it can apply custom configuration to the runtime image.

The following example provisions a runtime, installs extensions, and applies a custom system configuration file:

<plugins>
    <plugin>
        <groupId>org.codehaus.fabric3</groupId>
        <artifactId>fabric3-assembly-plugin</artifactId>
        <version>${fabric3.version}</version>
        <executions>
            <execution>
                <id>fabric3-assembly</id>
                <goals>
                    <goal>fabric3-assembly</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <runtimeVersion>${fabric3.version}</runtimeVersion>
            <profiles>
                <!-- JPA support -->
                <profile>
                    <groupId>org.codehaus.fabric3</groupId>
                    <artifactId>profile-jpa</artifactId>
                    <version>${fabric3.version}</version>
                </profile>
                <!-- Web Services support -->
                <profile>
                    <groupId>org.codehaus.fabric3</groupId>
                    <artifactId>profile-ws</artifactId>
                    <version>${fabric3.version}</version>
                </profile>
                <!-- Web App support -->
                <profile>
                    <groupId>org.codehaus.fabric3</groupId>
                    <artifactId>profile-web</artifactId>
                    <version>${fabric3.version}</version>
                </profile>
                <!-- JMS support -->
                <profile>
                    <groupId>org.codehaus.fabric3</groupId>
                    <artifactId>profile-jms</artifactId>
                    <version>${fabric3.version}</version>
                </profile>
                <!-- JAX-RS support -->
                <profile>
                    <groupId>org.codehaus.fabric3</groupId>
                    <artifactId>profile-rs</artifactId>
                    <version>${fabric3.version}</version>
                </profile>
                <profile>
                    <groupId>org.codehaus.fabric3</groupId>
                    <artifactId>profile-timer</artifactId>
                    <version>${fabric3.version}</version>
                </profile>

            </profiles>
            <!-- overlay configuration -->
            <configurationFiles>
                <copy>
                    <source>../../../config/security.xml</source>
                    <destination>runtimes/vm/config</destination>
                </copy>
                <copy>
                    <source>../../../datasource/h2-1.2.140.jar</source>
                    <destination>extensions/datasource</destination>
                </copy>
            </configurationFiles>
        </configuration>
    </plugin>
</plugins>