ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebo, Alex" <Alex.R...@acs-inc.com>
Subject RE: Invoking a target (Ant 1.7) in a loop (Ant-Contrib)
Date Wed, 17 Jan 2007 19:38:37 GMT
Use the uri attribute of (type/task)def, for example:

  <typedef uri="antlib:net.sf.antcontrib"
           resource="net/sf/antcontrib/antlib.xml">
    <classpath>
      <fileset dir="${basedir}/lib/ant/ant-contrib" includes="*.jar"/>
    </classpath>
  </typedef>

  <ac:for xmlns:ac="antlib:net.sf.antcontrib" param="p" list="a,b,c">
    <sequential>
       <echo>p is @{p}</echo>
    </sequential>

In ant 1.7.0, one can drop the resource, for example:
  <typedef uri="antlib:net.sf.antcontrib"
               classpath="/app/java/ant-contrib/ant-contrib-1.0b3.jar"/>

peter
====================================

Thank you once again, Peter.

Would it be beneficial to specify 

	xmlns:ac="antlib:net.sf.antcontrib"

only once, somewhere @ the beginning vs. at every reference of antcontrib
task?

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


Mime
View raw message