You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2004/04/06 13:14:12 UTC
DO NOT REPLY [Bug 28228] New: -
task
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28228
<classloader> task
Summary: <classloader> task
Product: Ant
Version: 1.7Alpha (nightly)
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Other
Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: rainer@noacks.net
This is the "formal" enhancement request for a <classloader>
task. In it's actual form, it has been introduced in the developer's
mailing list.
(see: http://marc.theaimsgroup.com/?l=ant-dev&m=108055794609605&w=2)
I would like to reactivate and extend the current "sleeping" <classloader>
task with a patch that is able to
a) append classpath entries to existing classloaders,
b) explicitely create classloaders,
c) put the actual path of a classloader into a property and
d) log a simple report about the currently classloaders.
Currently it supports URLClassLoader and AntClassLoader. It is
designed to simply support custom extensions for any arbitrary
ClassLoader.
Advantages
----------
As classpathes can completely managed from inside the build.xml,
this task can help
1. to avoid the need to either change Ant's default installation
by adding or removing jars to or from Ant's lib dir
or manage the classpath in the launching script and
2. to avoid classpath-problems with custom tasks
(especially if they should - for whatever reason - be used
as jars in the same buildfile as they were created).
b) and c) can be used to easily sync other task's classpathes and
d) might be helpful to debug some classpath problems and understand classloader
behaviour ;-)
Disadvantages
-------------
The most frequent raised objection is, that adding classpathes to existing
parent classloaders in a delegation hierarchy may lead to situations where
one class is loaded by two different classloaders in a delegation hierarchy
at the same time. This will most likely cause linkage errors and mysterious
failures.
(See: http://marc.theaimsgroup.com/?l=ant-dev&m=106389211508059&w=2
and http://marc.theaimsgroup.com/?l=ant-dev&m=104080215031773&w=2)
Another point is the risk of security loopholes if URLs are used as classpath
entries.
Both objections are reasonable but IMHO, the advantages outweigh them.
* The aforesaid potential risks are described in the task documentation.
* As this task is new, it can not endanger existing builds.
* Advanced users have the possibility to break the above-mentioned
requirements.
Regards,
Rainer
P.S. Adding this task to the external task list is dissatisfying IMHO,
as it shoots the major advantage (1.) down.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org