You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/04/09 17:11:47 UTC

DO NOT REPLY [Bug 11143] Javac should load build.compiler class from a defined classloader

https://issues.apache.org/bugzilla/show_bug.cgi?id=11143


Igor Peshansky <pe...@cs.nyu.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pechtcha@cs.nyu.edu
           Platform|PC                          |All
            Version|1.5                         |1.7.0
           Severity|enhancement                 |major




--- Comment #2 from Igor Peshansky <pe...@cs.nyu.edu>  2009-04-09 08:11:45 PST ---
This is actually a bug.  When a taskdef is used to create a task, the classpath
of that taskdef is ignored when loading build.compiler.  This bug is still
present in SVN HEAD.

The fix is indeed to pass the task into resolveClassName() and to use its
classloader to load the build.compiler class.  Instead of using
task.getProject().getCoreLoader() (as in comment #1), one could use
task.getClass().getClassLoader() (since the task class itself would have been
loaded from the right classpath).

Since this affects older versions of ant as well, perhaps it should also be
back-ported to maintenance releases for 1.5 through 1.6.5...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.