Asle, --- Asle Pedersen <[EMAIL PROTECTED]> 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"/> with: <pathelement location="${basedir}/lib/ant-commons-net.jar"/> <pathelement location="${basedir}/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 Ivan > > Regards, > Asle > [1]http://ant.apache.org/faq.html#delegating-classloader-1.6 ____________________________________________________ Sell on Yahoo! Auctions no fees. Bid on great items. http://auctions.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]