GithubHelp home page GithubHelp logo

pkdevboxy / wildfly-build-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wildfly/wildfly-build-tools

0.0 2.0 0.0 516 KB

Wildfly build and provisioning tools

License: Apache License 2.0

Java 99.26% Groovy 0.74%

wildfly-build-tools's Introduction

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 nessesary 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: . These artifact references will be replaces by concrete references to a specific version or a reference when the server is provisioned. Because the version is not hard coded into the module.xml files this makes it possible to override the version of specific artifacts at provisioning time.

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: https://github.com/wildfly/wildfly-core/blob/master/core-feature-pack/feature-pack-build.xml https://github.com/wildfly/wildfly-core/blob/master/dist/server-provisioning.xml https://github.com/wildfly/wildfly/blob/master/feature-pack/feature-pack-build.xml https://github.com/wildfly/wildfly/blob/master/dist/server-provisioning.xml

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>

wildfly-build-tools's People

Contributors

bobmcwhirter avatar ctomc avatar darranl avatar dmlloyd avatar emmartins avatar jamezp avatar jmesnil avatar n1hility avatar pgier avatar ppalaga avatar ssilvert avatar stuartwdouglas avatar tadamski avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.