# 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>4.2.2.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>4.2.2.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>