Giter Club home page Giter Club logo

jboss-modules-ant-task's Introduction

de.holisticon.toolbox:jboss-modules-ant-task

Build Status Maven Central

JBoss Modules Ant Task

The JBoss Modules Ant task provides an easy way to create one or more JBoss Modules modules via Ant without resorting to using copy tasks and versioning module.xml files. See this blog post for more information about JBoss Modules.

Information

The Ant task supports creating a module directory structure as well as the creation of a module.xml file for the specified module.

Examples

Check examples for different scenarios of usage. Simpliest example create two modules de.holisticon.simple and de.holisticon.other with a dependency between them. Both are placed into target-dir.

	<modules todir="${target-dir}" overwrite="true">
		<module name="de.holisticon.simple" slot="1.0">
			<resourceFileSet dir="${repository}/aopalliance/aopalliance/jar">
				<include name="*.jar" />
			</resourceFileSet>
			<dependency name="de.holisticon.basic" export="true" optional="true" />
		</module>
		<module name="de.holisticon.other">
			<dependency name="de.holisticon.simple" slot="1.0" export="true" optional="true" />
		</module>
	</modules>

The style of the Ant task is intentionally meant to look like a copy task since that is its main function. The module type supports a set of FileSets which allows you to easily specify the files to be included in the module.

The modules task supports the following attributes:

  • todir: the base directory in which modules will be created
  • overwrite: indicates whether or not to overwrite existing module artifacts if the destination already exists.
  • createMainSlot: controls, if default slots (main) are created.

The module type is used to specify one or more modules to create in the directory specified by modules' todir attribute. Module files can be specified as would normally be done with a FileSet by using either includes/excludes attributes or include/exclude nested elements. For this purpose module type supports a set of nested FileSet elements. For specifying dependencies to other modules, a nested dependency type is supported. In addition it supports following attributes:

  • name: the name of the module. The Ant task will create a directory hierarchy based on the specified dot-separated name. Each segment of the name separated by a dot will be turned into a path element for the module directory.
  • slot: an optional slot name. The slot name is used to differentiate multiple versions of the same module. The slot name is used as the final path name in the directory hierarchy created for the module. If not specified, the slot defaults to main.

The dependency element is used to specify modules that are dependencies for the module being defined by the module type. It currently supports the following attributes:

  • name: the name of the module that is being defined as a dependency. This is a required attribute.
  • slot: an optional attribute used to define the slot to which the dependency belongs. No slot is included in the descriptor if this attribute is omitted. This is done in case JBoss Modules changes the default slot value in the future.
  • export: an optional boolean attribute which indicates whether or not the dependency is exported with the module in which the dependency is defined.
  • optional: an optional boolean attribute which indicates whether or not the dependency is optional. If this attribute is omitted, it has the effect of making dependency required.

See the JBoss Modules Descriptor documentation for information regarding the format of module descriptors. The Ant task does not currently support any features supported by JBoss Modules that are not explicitly detailed in this document (i.e. main-class).

Installation and Usage

The easiest way to install is to drop the file into ~/.ant/lib. To use the task in your build files, use the following taskdef:

<taskdef resource="de/holisticon/toolbox/ant/antlib.xml" />

jboss-modules-ant-task's People

Contributors

zambrovski avatar david-hosier avatar gunnarmorling avatar tpohl avatar

Stargazers

Andriy Kalashnykov avatar

Watchers

 avatar James Cloos avatar Andriy Kalashnykov 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.