You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Peter Donald <do...@apache.org> on 2001/07/04 16:42:25 UTC
Re: [Bug 2412] - Self-coded tasks must be compiled before taskdef can be used
On Thu, 5 Jul 2001 00:04, bugzilla@apache.org wrote:
> + ------- Additional Comments From bodewig@apache.org 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.
Cheers,
Pete
*-----------------------------------------------------*
| "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 |
*-----------------------------------------------------*
Re: [Bug 2412] - Self-coded tasks must be compiled before taskdef can be used
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 05 Jul 2001, Boris Boehlen <bo...@cs.rwth-aachen.de> wrote:
> If there is no backwards compatible solution for this bug I can life
> with it being set to "Resolved Later"
I think there is, going to commit it later today.
> Is there some kind of time schedule for Ant2?
No, it will be done when it's done, sorry. We are having a hard time
making design decissions.
Stefan
Re: [Bug 2412] - Self-coded tasks must be compiled before taskdef can be used
Posted by Boris Boehlen <bo...@cs.rwth-aachen.de>.
Hello,
> 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.
If there is no backwards compatible solution for this bug I can life
with it being set to "Resolved Later" as in my enviroment I need need a
shell script to invoke the build process. At the moment this build
script no only puts the classes required for Ant into the CLASSPATH but
it also the creates the directory in which the compiled tasks will be.
Not a very elegant solution but a working one.
Is there some kind of time schedule for Ant2?
Boris
--
Dipl.-Inform. Boris Boehlen
RWTH Aachen - Department of Computer Science III
Ahornstrasse 55, 52074 Aachen, Germany
email: boris@i3.informatik.rwth-aachen.de
phone: +49 (2 41) 80 21 315 fax: +49 (2 41) 88 88 218
Re: [Bug 2412] - Self-coded tasks must be compiled before taskdef can be used
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 5 Jul 2001, Peter Donald <do...@apache.org> wrote:
>> + All we could do is to always use a classloader of our own ...
>
> Unofrtunately thats a no-go with system classloader.
"always use a classloader of our own in taskdef" is what I wanted to
say. This should fix the problem and work in Ant 1.1.
Stefan