import task

Description

This task is used to include / import scripts.

The include mechanism is similar to the current import task, excepts that it automatically prefixes all targets of the used build module (=ant script).
The prefix used by default is the name of the imported project, but it can be overriden when calling "include".

This is useful to use features provided by a build module, while preserving a namespace isolation to avoid names collisions.

While possible, overriding a target defined in a included module is not recommended. To do so, the import mechanism is preferred.

The import mechanism is equivalent to the current import mechanism.

This tasks also support build configurations feature and property as dynamic (see examples bellow).

Arguments

Parameter name Description Mandatory
organisation plugin organisation name true (if using exploded style)
module plugin module name
revision plugin revision id
mrid a module revision id(Syntax: organisation#module;revision) true (if using mrid style)
as an alias for imported/included targets
mode specify if we want to import or include
modulesDir specify a directory where modules will be retrieved
buildConfigurations specify one a many build configurations separated by a comma
mainConf list of main ivy configurations used for artifact resolution serated by commas
Default: default
providedConf list of provided ivy configurations used for artifact resolution serated by commas
Default: provided
changing specify if easyant should check changing artifacts on each call
Default: false

Examples

module A:
<target name=":bar" >
<dobar />
</target>

<target name=":baz" depends=":bar" />
module B:
<ea:include module="A" />
This is equivalent to:
<target name="A:bar" >
<dobar />
</target>

<target name="A:baz" depends="A:bar" />
OR for module B:
<ea:include module="A" id="C" />
which is equivalent to:
<target name="C:bar" >
<dobar />
</target>

<target name="C:baz" depends="C:bar" />

Example using build configurations

<ea:include module="A" buildConfigurations="myconf,myotherconf"/>
The module A will be included only if one of the following build configuration is active : myconf or myotherconf

Example using properties as dynamic attributes

<ea:include module="A" myproperty="myvalue" my.complex.property="myothervalue"/>
The two properties (myvalue and my.complex.property) will be created on the fly, then module A will be included.