ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Chalons <frederic.chal...@hsoftware.com>
Subject Re: AW: Equivalent to -lib option within the ant-file itself with no taskdef?
Date Fri, 06 Jan 2006 11:13:34 GMT
Hi Jan,

Thanks.
I thought some discovering process was happening under the hood
... got a better understanding of optional tasks now ;)

However, in the case of a foreach task, the classpath is indicated 
whithin the taskdef.
How do I inform Ant about the classpath to use for my optional tasks.
I don't want to pass it through the commandline with -lib but within the 
ant file.

Regards,
Frédéric

Jan.Materne@rzf.fin-nrw.de wrote:

>>To include ant-contrib, I have to do the following:
>>
>>   /<taskdef resource="net/sf/antcontrib/antcontrib.properties">/
>>   /  <classpath>/
>>   /    <pathelement location="your/path/to/ant-contrib.jar" />/
>>   /  </classpath>/
>>   /</taskdef>/
>>
>>antcontrib.properties defined the
>>"typename=fully.qualified.java.classname" 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 "typename=fully.qualified.java.classname" 
>>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/default.properties
>
>
>Jan
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>  
>

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