[armedbear-devel] JAR file support patches
Alessio Stalla
alessiostalla at gmail.com
Tue Jan 26 19:17:48 UTC 2010
On Tue, Jan 26, 2010 at 1:21 PM, Axel Rauschmayer <axel at rauschma.de> wrote:
>>> Incidentally, we may be able to autodiscover .asd files by scanning
>>> the classpath, and suitably update asdf:*central-registry*.
>>
>> We first need to agree on a convention to wedge the concept of Pathname
>> into CLASSPATH. I now support your earlier proposal to keep the two
>> separate, as it makes more sense. And I'd like to get the "jar:" part
>> of my changes into the trunk, and tested for a bit before introducing
>> another the next step. Right now, wildcards (and DIRECTORY) don't work
>> inside JARs which would be the first step to autodiscovery.
>
>
> With Java resources, one is always warned against using the classpath that way. Looking for a particular path is possible, but listing paths (or files) not. It might be safer to introduce an additional concept. This could be an explicit list of Java resource paths or a new kind of ASDF classpath.
Scanning the entire "classpath" (or better, the resources known to
classloaders) in general is impossible, since a classloader can create
a resource from anywhere (e.g. from a buffer in memory, like ABCL
itself does for runtime compilation).
However, it is possible to scan the classpath in the most common
cases, i.e. when the resources are either on the filesystem or in some
Jar loaded by a regular URLClassLoader.
I agree that doing it right, for some value of right, is far from easy
as there are tricky cases (e.g. classloaders used by some application
servers) that you might still want to handle.
Alessio
> Here is how Spring does auto-detection:
> http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-scanning-autodetection
>
> Here is more information from Sun on finding classes:
> http://java.sun.com/j2se/1.5.0/docs/tooldocs/findingclasses.html
>
> --
> Axel.Rauschmayer at ifi.lmu.de
> http://www.pst.ifi.lmu.de/~rauschma/
>
>
>
>
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>
More information about the armedbear-devel
mailing list