[armedbear-devel] packaging external libs with abcl

Mark Evenson evenson at panix.com
Mon Sep 21 10:11:58 UTC 2009

On 9/20/09 6:32 PM, Matthew D. Swank wrote:
> On Sun, 20 Sep 2009 10:12:48 +0200
> Mark Evenson<evenson at panix.com>  wrote:
>> Why not package the library code in ASDF itself, using ASDF's
>> dependency mechanism to pull in the necessary code?  For packaging
>> JARs with Java code as ASDF entries, [Alan Ruttenberg's JSS
>> extension][1] allows the specification of JAR files in ADSF under
>> ABCL.  The [following snippet][asdf-jar]
> Doesn't this still extract the components in the jar to the file
> system (I am trying to do this on the appengine), or does this use the
> new jar path functionality (e.g. (load
> "jar:file:///PATH/TO.jar!/foo")) in rev-12141?

No, JSS loads code straight from the JAR files, currently it can only 
reference Java classes.  JSS uses the Bean Shell custom classpath loader 
to dynamically add JAR files to the classpath as represented Lisp-side 
as CL-USER:*ADDED-TO-CLASSPATH*.  What that syntax shows is ABCL under 
JSS dynamically modifying the classpath to include additional JARs after 
starting up (in my example, JARs containing a semantic web reasoner from 
STI Innsbruck known as IRIS).  Practically what this means is that one 
just has to specify abcl.jar, jscheme.jar, and bsh-2.0b4.jar on ABCL's 
initial classpath, after which you can programatically add additional 
JARs via ASDF systems.  This is very useful when using ABCL to "wrap" 
Java libraries with a Lisp layer.  Since you indicate in a separate post 
that Google App Engine does not allow even read-only access to the 
filesystem, I suspect that this won't help with your problem.

N.B. there is a Ant build property named 'additional.jars' which 
includes additional JARs when creating the ABCL wrapper to facilitate 
this kind of interaction if you find yourself *always* needing to refer 
to JAR files from ABCL.  I usually create a 'build.properties' file with 
references to my local copies 'jscheme.jar' and 'bsh-2.04.jar' in my 
top-level ABCL build directory.  That way, when I need the JSS 
extension, I can just load it in via ASDF.

[svn 12141] allows one to start referring to Lisp code contained in JARs 
other than 'abcl.jar', but I need to get a few more improvements into 
ABCL before it becomes a reasonable method to use ASDF to wrap Lisp code 
contained in JARs.  The first improvement would be to allow 
MERGE-PATHNAMES to work with jar:file pathnames so one could specify 
relative pathnames to package an ASDF system within a JAR file.  The 
second improvement would to be use wildcard jar:file pathnames to 
specify things like "the first JAR in the CLASSPATH which has a 
'!/foo.asd' entry".  The third thing would probably be to create an ABCL 
custom classpath loader like that provided in Bean Shell (and used by 
JSS as CL-USER:*ADDED-TO-CLASSPATH*) so that dynamically adding 
references to JARs while running ABCL would be easy.  After all this, I 
think deploying ABCL applications in JAR files would be a lot simpler.

"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."

More information about the armedbear-devel mailing list