ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Equivalent to -lib option within the ant-file itself with no taskdef?
Date Fri, 06 Jan 2006 09:54:23 GMT
>To include ant-contrib, I have to do the following:
>    /<taskdef resource="net/sf/antcontrib/">/
>    /  <classpath>/
>    /    <pathelement location="your/path/to/ant-contrib.jar" />/
>    /  </classpath>/
>    /</taskdef>/
> defined the
>"" associations.
>However, for the FTP task, I can just pass as argument to the 
>-lib option the path of jakarta-oro and commons-net.
>I do not need any taskdef or "" 
>and Ant still find his way out when I use <ftp>...</ftp>
>I would like to get the same behaviour without using "-lib" on 
>the commandline and rather define the extra jar within 
>build.xml itself.
>How can I do that?

Modify Ant. :-)

The main difference is that e.g. <foreach> is implemented in ant-contrib.jar which
is not part of Ant. So you have to do
- add the jar to Ants classpath
- taskdef the task

With <ftp> it´s different. The task implementation is part of Ant! So 
- all needed jars have to be added to Ants classpath
  - implementing class is in ANT_HOME/lib/ant-commons-net.jar
  - needed external libs (oro, commons-net)
- the task has to be taskdefs
  - is already done in ANT_HOME/lib/ant.jar!org/apache/tools/ant/taskdefs/


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message