ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: [Bug 2412] - Self-coded tasks must be compiled before taskdef can be used
Date Wed, 04 Jul 2001 14:42:25 GMT
On Thu,  5 Jul 2001 00:04, wrote:
> + ------- Additional Comments From  2001-07-04 07:04
> ------- + The problem seems to be that your build.classes.dir doesn't exist
> when you start + Ant - if I create the directory my task gets compiled into
> before I start Ant + (and add this directory to CLASSPATH), everything
> works fine.
> +
> + It looks as if the system classloader would automatically drop all
> CLASSPATH + entries that point to nowhere - could you please verify that
> this is true in your + case as well (i.e. create build.classed.dir in your
> shell script before you + invoke Ant).

It is JVM dependent. Later versions of IBMs and Suns JVMs will drop 
non-existing dirs from system ClassPath (though they will keep it for 
bootstrap and extdirs Classpaths).

> + All we could do is to always use a classloader of our own ...

Unofrtunately thats a no-go with system classloader. We would need to load 
ant and all it's utilities via a launcher jar that sets up classloader as 
appropriate. This is something that will definetly be in ant2 (easy to do as 
URLClassLoader exists in jdk1.2). 

It could also be done for ant1.x but it would require reworking all the 
scripts and packaging. It would also unfortunately break a lot of build 
environments (about half the projects at jakarta) that assume that ant is in 
system classloader. Not sure there is a good backwards compatible solution.



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message