Provision a server

The provision goal allows you to provision a server using Galleon.

By default the server is provisioned in the target/server directory.

Provision the latest complete WildFly installation

The example below shows how to produce the latest released WildFly server. No configuration arguments are needed. By default the plugin will provision the latest released version.

<project>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>5.1.1.Final</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>provision</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            ...
        </plugins>
        ...
    </build>
...
</project>

Provision a server trimmed with Galleon layers

The example below shows how to produce an WildFly server installation trimmed with Galleon Layers:

<project>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>5.1.1.Final</version>
                <configuration>
                    <feature-packs>
                        <feature-pack>
                            <location>wildfly@maven(org.jboss.universe:community-universe)</location>
                        </feature-pack>
                    </feature-packs>
                    <layers>
                        <!-- jaxrs-server Galleon layer adds the server content required to run JAXRS applications --> 
                        <layer>jaxrs-server</layer>
                    </layers>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>provision</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            ...
        </plugins>
        ...
    </build>
...
</project>

Provision a server with specific Galleon version

The example below shows how to produce an WildFly server installation using a specific Galleon version, e.g., 32.0.1.Final

<project>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>5.1.1.Final</version>
                <configuration>
                    <provisioning-dir>/opt/server</provisioning-dir>
                    <feature-packs>
                        <feature-pack>
                            <groupId>org.wildfly</groupId>
                            <artifactId>wildfly-galleon-pack</artifactId>
                            <version>32.0.1.Final</version>
                        </feature-pack>
                    </feature-packs>
                    <layers>
                        <!-- jaxrs-server Galleon layer adds the server content required to run JAXRS applications -->
                        <layer>jaxrs-server</layer>
                    </layers>
                </configuration>
                <executions>
                    <execution>
                        <id>install-wildfly</id>
                        <goals>
                            <goal>provision</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            ...
        </plugins>
        ...
    </build>
...
</project>