WildFly Build Tools: Feature Pack Build Maven Plugin

Tools used for building and provisioning the Wildfly server

License

License

Categories

Categories

WildFly Container Application Servers Maven Build Tools
GroupId

GroupId

org.wildfly.build
ArtifactId

ArtifactId

wildfly-feature-pack-build-maven-plugin
Last Version

Last Version

1.2.13.Final
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

WildFly Build Tools: Feature Pack Build Maven Plugin
Tools used for building and provisioning the Wildfly server
Project Organization

Project Organization

JBoss by Red Hat

Download wildfly-feature-pack-build-maven-plugin

How to add to project

<plugin>
    <groupId>org.wildfly.build</groupId>
    <artifactId>wildfly-feature-pack-build-maven-plugin</artifactId>
    <version>1.2.13.Final</version>
</plugin>

Dependencies

compile (8)

Group / Artifact Type Version
org.apache.maven.shared : maven-filtering jar 3.1.1
org.apache.maven : maven-model jar 3.2.5
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5
org.wildfly.build : wildfly-server-provisioning jar 1.2.13.Final
org.jboss.logging : jboss-logging jar 3.4.0.Final
org.jboss : staxmapper jar 1.3.0.Final
com.fasterxml.woodstox : woodstox-core jar 5.0.3
org.codehaus.woodstox : stax2-api jar 3.1.4

provided (5)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.2.5
org.apache.maven : maven-plugin-api jar 3.2.5
org.eclipse.aether : aether-api jar 1.1.0
org.eclipse.aether : aether-util jar 1.1.0
org.wildfly.checkstyle : wildfly-checkstyle-config jar 1.0.5.Final

test (4)

Group / Artifact Type Version
org.apache.maven : maven-compat jar 3.2.5
org.apache.maven : maven-settings-builder jar 3.2.5
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

WildFly Build Tools

This project contains Maven plugins and related tools which are used for building WildFly. The feature-pack-maven-plugin is used to create a lightweight artifact that contains a complete description of a set of server features. The wildfly-server-provisioning-maven-plugin is used to provision the servers creating the full distribution.

Feature Packs

The wildfly build process consists of first generating a WildFly 'feature pack', which is a lightweight artifact that contains a complete description of a set of server features. These feature packs can be provisioned into full servers, or used as dependencies for other feature packs. In general the build process will first create a feature pack using the wildfly-feature-pack-build-maven-plugin, and then use the wildfly-server-provisioning-maven-plugin to provision 'thin' and 'fat' servers into the build and dist directories respectively.

Feature packs are assembled from a feature-pack-build.xml file, the schema of which can be found in the sources: https://github.com/wildfly/wildfly-build-tools/blob/master/feature-pack-build-maven-plugin/src/main/resources/

In order to build a feature pack it is necessary to create three directories in the src/main/resources folder:

modules: contains module.xml files. These files should not use references, but should instead use references of the form: <artifact name="${org.hibernate:hibernate-core}"/>.These artifact references will be replaced by concrete references to a specific version or a reference when the server is provisioned. This makes it possible to override the version of specific artifacts at provisioning time. In addition, version numbers can be automatically added to module descriptors of version 1.6 or later by adding a version attribute whose argument is either a fixed version string or one of the given artifact references. The version number will appear on stack traces on Java 9 and later.

content: contains files that are copied into the server.

configuration: contains configuration templates that are used to generate server configuration files.

Usage

The plugins are configured in the "plugins" section of the pom.

<plugins>
  <plugin>
    <groupId>org.wildfly.build</groupId>
    <artifactId>wildfly-feature-pack-build-maven-plugin</artifactId>
    <executions>
      <execution>
        <id>feature-pack-build</id>
        <goals>
          <goal>build</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
          <config-file>feature-pack-build.xml</config-file>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>
<plugins>
  <plugin>
    <groupId>org.wildfly.build</groupId>
    <artifactId>wildfly-server-provisioning-maven-plugin</artifactId>
    <executions>
      <execution>
        <id>server-provisioning</id>
        <goals>
          <goal>build</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
          <config-file>server-provisioning.xml</config-file>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

Config Parameters

Most of the configuration for each plugin is contained in a separate configuration file defined by the parameter config-file.

The schema for the config file for the wildfly-feature-pack-build-maven-plugin can be found in the sources here: https://github.com/wildfly/wildfly-build-tools/blob/master/feature-pack-build-maven-plugin/src/main/resources/

The schema for the config file for the wildfly-server-provisioning-maven-plugin can be found in the sources here: https://github.com/wildfly/wildfly-build-tools/tree/master/provisioning/src/main/resources

Example Config Files

Some example configurations can be found in the wildfly-core and wildfly sources:

Provisioning configuration attributes

  • copy-module-artifacts - whether should be WildFly modules resources (JARs) copied from artifacts into WILDFLY_HOME/modules, next to their module.xml.
  • extract-schemas - whether should be XSD files extracted from WildFly modules artifacts into WILDFLY_HOME/docs/schema
  • extract-schemas-groups - groupId of artifacts, from which should be XSD files extracted (delimited by space)

Example Server Provisioning Filter

When provisioning a server from a feature pack, it's can be useful to exclude certain files from the resulting distribution. This can be done using the config. The following example will exclude the files "copyright.txt" and "README.txt" and also the directory "docs/contrib".

<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1" extract-schemas="true" copy-module-artifacts="true"
                     extract-schemas-groups="org.jboss.as org.wildfly org.wildfly.core org.jboss.metadata">
  <feature-packs>
    <feature-pack groupId="org.wildfly" artifactId="wildfly-feature-pack" version="${project.version}">
      <contents>
        <filter pattern="copyright.txt" include="false"/>
        <filter pattern="README.txt" include="false"/>
        <filter pattern="docs/contrib/*" include="false"/>
      </contents>
    </feature-pack>
  </feature-packs>
</server-provisioning>
org.wildfly.build

Versions

Version
1.2.13.Final
1.2.12.Final
1.2.11.Final
1.2.10.Final
1.2.9.Final
1.2.8.Final
1.2.7.Final
1.2.6.Final
1.2.5.Final
1.2.4.Final
1.2.3.Final
1.2.2.Final
1.2.1.Final
1.2.0.Final
1.1.8.Final
1.1.7.Final
1.1.6.Final
1.1.5.Final
1.1.4.Final
1.1.3.Final
1.1.2.Final
1.1.1.Final
1.1.0.Final
1.1.0.CR2
1.1.0.CR1
1.1.0.Beta2
1.1.0.Beta1
1.0.0.Final
1.0.0.Alpha8
1.0.0.Alpha6
1.0.0.Alpha5
1.0.0.Alpha4
1.0.0.Alpha3
1.0.0.Alpha2
1.0.0.Alpha1