parameter task

Description

parameter tasks is used to :

This could be useful in precondition of each modules, to check if property/path are set. And much more useful to document our modules.

Arguments

Parameter nameDescriptionMandatory
path specify the path id to check One of these
property specify the property to check
description give a description to the property / path true
required specify if the property / path is mandatory
defaultValue specify a default value (only available for property)

Examples

Mandatory property

<ea:parameter property="src.main.java" required="true" description="directory where sources to be compiled are" />
Here the src.main.java property is mandatory and will make a build failed if this property is not set displaying the following error message :
BUILD FAILED
expected property 'src.main.java': directory where sources to be compiled are

Non mandatory property

<ea:parameter property="src.main.java" description="directory where sources to be compiled are" />
Here the src.main.java property is not mandatory and no check will be done on it.
Even if no check is done, this could be usefull to document your build-script (ie. give a description to your properties)

Non mandatory property with default value

<ea:parameter property="src.main.java" default="src/main/java" description="directory where sources to be compiled are" />
Here the src.main.java property is not mandatory.
If the property is not set easyant will initialise this property with a default value.

Mandatory path

<ea:parameter path="mypath" required="true" description="my path is used to ..." />
Here mypath is mandatory and will make a build failed if this path is not set displaying the following error message :
BUILD FAILED
expected path 'mypath': my path is used to ...