Return-Path:
There are several ways to use the tasks: The traditional way:
-
- <taskdef
- resource="org/apache/ant/props/antlib.xml">
- <classpath>
- <pathelement location="YOUR-PATH-TO/ant-props.jar"/>
- </classpath>
- </taskdef>
+ <typedef resource="org/apache/ant/props/antlib.xml"
+ classpath="YOUR-PATH-TO/ant-props.jar"/>
- Using this approach the provided extensions will live in the default namespace.
+ Using this approach the provided extensions will live in the default namespace.
Similar, but assigning a namespace URI
<typedef uri="antlib:org.apache.ant.props" - resource="org/apache/ant/props/antlib.xml"> - <classpath> - <pathelement location="YOUR-PATH-TO/ant-props.jar"/> - </classpath> - </taskdef> + resource="org/apache/ant/props/antlib.xml" + classpath="YOUR-PATH-TO/ant-props.jar"/>Placing the properties extensions into their own namespace, usable e.g.:
- <project - xmlns:props="antlib:org.apache.ant.props" - xmlns="antlib:org.apache.tools.ant"> + <project xmlns:props="antlib:org.apache.ant.props"> ... <propertyhelper> <props:nested /> </propertyhelper>- or a variation thereof. + or a variation thereof.
ant-props.jar
+ Using Ant's autodiscovery. Place ant-props.jar
into a directory and use ant -lib
DIR-CONTAINING-THE-JAR
or copy it into
ANT_HOME/lib
- and then in your build file, simply
declare the namespace on the project
tag:
- <project - xmlns:props="antlib:org.apache.ant.props"> + <project xmlns:props="antlib:org.apache.ant.props">And all tasks of this library will automatically be available - in the
props
namespace without any
- taskdef
.
+ in the props
namespace without any typedef
.
The types provided are (so far) instances of
org.apache.tools.ant.PropertyHelper.Delegate
and can be invoked
- using the <propertyhelper> task provided at the referenced Bugzilla entry:
+ using the <propertyhelper>
task provided at the referenced Bugzilla entry:
ref:refid
, expands to reference refid.${${double-expand-me}}
.
+ ref:refid
, resolves reference
+ refid
.
+ type:arg
, attempts to invoke
type
constructor (project, arg)
,
then (arg)
.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org