ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Wilson" <netp...@gmail.com>
Subject Re: Repeating a task for a list of directories
Date Thu, 06 Mar 2008 10:33:45 GMT
Thanks for the information, I believe I need ant-contribs foreach such that
I can do some processing for each subdirectory.  I've downloaded the jar
file and would prefer not to copy it directly into Ant libs folder, such
that the next person to do a svn update can run with it without having to
think about it.

However, the documentation on sourceforge is not explaining how to do this
(the homepage version http://ant-contrib.sourceforge.net/ contains less
information than the other tasks section (
http://ant-contrib.sourceforge.net/tasks/index.html).

Basically, trying to work out whether I need to reference the .xml or
.properties reference, and where it exists - it complains it can't find it,
but it's not in the .zip file downloaded... Am I meant to create it? What's
in it? Help! ;-)

It states....

Keep ant-contrib-version.jar in a separate location. You now have to tell
Ant explicitly where to find it (say in /usr/share/java/lib):

<taskdef *resource="net/sf/antcontrib/antlib.xml*">
  <classpath>
    <pathelement location="/usr/share/java/lib/ant-contrib-version.jar"/>
  </classpath>
</taskdef>

If you would like to use run with Ant Version 1.5 you must use the the
.properties file instead. Keep in mind that some tasks will not be available
to you , such as the <for> task:

<taskdef resource="net/sf/antcontrib/antcontrib.properties">
  <classpath>
    <pathelement location="/usr/share/java/lib/ant-contrib-version.jar"/>
  </classpath>
</taskdef>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message