ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: storing optional (ftp) task jar dependency under my project instead of under /ant/lib
Date Tue, 12 Jul 2005 17:37:05 GMT

--- Asle Pedersen <> wrote:

> I prefer alt.3 and try using taskdefs before without
> success. I did
> try it again now also not successfully. Could you
> please supply me
> with a complete working example?
I've implemented this approach only once for <junit>,
because I was only curious and It is of no benefit of
any environment I work on. Let me just ask you why do
you insist on it.

I think you should change this:
> 	   <pathelement
> location="/lib/ant-commons-net.jar"/>
> 	   <pathelement
> location="/lib/commons-net-1.1.0.jar"/>



> Is it really necessary to place ant-commons-net in
> the classpath since
> it is already under the ant/lib path? btw! 
Yes, it is. It is the way Java classloaders work, not
an Ant restriction. <taskdef> uses a separate
classloader to load the jars related with the task
that is being defined. On the other hand, jars that
are in $ANT_HOME/lib are loader by another
classloader. So you can not have ant-commons-net
loader by the one and commons-net loader by the other.

> I am using ant.1.6.5
See [1] for a nicer explanation


> Regards,
> Asle

Sell on Yahoo! Auctions – no fees. Bid on great items.

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

View raw message