ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: Task help
Date Thu, 19 Oct 2006 07:58:14 GMT
On 10/19/06, Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de> wrote:
> You can use external tasks in the way of Ant until 1.5 (which is and will supported in
the feature too):
> * place the jar in ${user.home}/.ant/lib, so Ant adds it to its classpath
> * declare the tasks:
>   - use <taskdef> for the mapping of taskname-classname
>     + for each task
>     + for a bundle of tasks using properties-file
>
> Since Ant 1.6 we have "Antlibs". Same here:
> * place the jar in ${user.home}/.ant/lib, so Ant adds it to its classpath
> * declare the tasks
>   - use <taskdef> for the mapping of taskname-classname
>     + for each task
>       <taskdef name="for" classname="net.sf.antcontrib.For"/>
>     + for a bundle of tasks using properties-file
>       <taskdef file="net/sf/antcontrib/default.properties"/>
>     + NEW: for a bundle of tasks using xml-file
>       <taskdef file="net/sf/antcontrib/antlib.xml"/>
>   - NEW: use of xml namespaces and "antlib:" protocol for a bundle of tasks using the
xml file (antlib.xml)
>     <project .... xmlns:ac="antlib:net.sf.antcontrib">
>         <ac:for>
>
>
> I'll put a note into the manual at "Using Ant :: (NEW) Use of external tasks"
>
>
> Jan
I am thinking of adding:

  <project xmlns:ac="antlib:net.sf.antcontrib">
     <typedef antlib="antlib:net.sf.antcontrib"
                   classpath="${PATH_TO_ANTCONTRIB.JAR}"/>

which would be equilivent to
  <typedef uri="antlib:net.sf.antcontrib"
                resource="net/sf/antcontrib/antlib.xml"
                classpath="${PATH_TO_ANTCONTRIB.JAR}"/>


Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message