Create a Provisioning Configuration File
You will need a small XML file to define which feature packs you want to assemble.
The following example will create a full WildFly server but also include a copy of the latest Hibernate ORM modules:
Example 2. Example Provisioning Configuration File
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1" copy-module-artifacts="true">
<feature-packs>
<feature-pack
groupId="org.hibernate"
artifactId="hibernate-orm-jbossmodules"
version="${hibernate-orm.version}" />
<feature-pack
groupId="org.wildfly"
artifactId="wildfly-feature-pack"
version="${wildfly.version}" />
</feature-packs>
</server-provisioning>
Of course should you wish your custom server to have more features you can list additional feature packs.
It is also possible to build a “thin” server by not setting the copy-module-artifacts flag, or you can further customize and filter out things you want removed.
See the README of the WildFly Build Tools project on Github for more details.
Next you can use either the Maven plugin or the Gradle plugin to actually create a fresh copy of your custom server.