This tag sets an attribute of an Ant task or datatype if the given value is not null. This is very useful in allowing attributes of ant tasks to be set conditionally without ugly if/then/else logic.
Name | Description | Required |
---|---|---|
name | The name of the attribute of the ant task to set | Yes |
value | The value to give the attribute of the ant task | Yes. |
default | The default value to give the attribute of the ant task, if the value provided is null. | No |
This tag is always nested inside of another Ant task, target or datatype.
<j:jelly xmlns:j="jelly:core" xmlns:ant="jelly:ant"> <ant:javac destdir="${maven.build.dest}" excludes="**/package.html" debug="${maven.compile.debug}" deprecation="${maven.compile.deprecation}" optimize="${maven.compile.optimize}"> <ant:setProperty name="encoding" value="${maven.compile.encoding}" /> <ant:setProperty name="executable" value="${maven.compile.executable}" /> </ant:javac> </j:jelly>