Re: Self written ant task does not get the CLASSPATH passed to ant with -lib option

2009-08-26 Thread Hans Deragon
For posterity, I confirm that it works. Thank you. Best regards, Hans Deragon > On 2009-08-26, Hans Deragon wrote: > >> Now the question is: how can I access the instance of AntClassLoader >> being used by ant and which contains all the -lib entries? > > Use a class loaded by that classloader,

Re: Self written ant task does not get the CLASSPATH passed to ant with -lib option

2009-08-26 Thread Stefan Bodewig
On 2009-08-26, Hans Deragon wrote: > Now the question is: how can I access the instance of AntClassLoader > being used by ant and which contains all the -lib entries? Use a class loaded by that classloader, say org.apache.tools.ant.Main.class.getClassloader() this will be an instance of AntCl

Re: Self written ant task does not get the CLASSPATH passed to ant with -lib option

2009-08-26 Thread Hans Deragon
Greetings. Thank you for the answer. I found this section that explains what you are stating: http://ant.apache.org/faq.html#delegating-classloader-1.6 Now the question is: how can I access the instance of AntClassLoader being used by ant and which contains all the -lib entries? I searched th

Re: Self written ant task does not get the CLASSPATH passed to ant with -lib option

2009-08-25 Thread Stefan Bodewig
On 2009-08-25, Hans Deragon wrote: > Why the paths passed to ant with -lib are not found in the CLASSPATH? Because -lib doesn't work that way 8-) Ant's launcher constructs a new classloader containing the stuff from -lib and loads Ant's Main class using that classloader. > How can I fix this?

Self written ant task does not get the CLASSPATH passed to ant with -lib option

2009-08-25 Thread Hans Deragon
Greetings. Moving ant scripts from Eclipse to a standalone system, I found out that my own written Ant task does not get the full CLASSPATH passed to ant with the -lib option. ant \ -lib /somepath \ -lib /somepath/ant.personal.properties \ -lib /usr/java5/lib \ -lib /usr/java5/jre/l