source: trunk/abcl/contrib/asdf-jar/README.markdown @ 13350

Last change on this file since 13350 was 13350, checked in by Mark Evenson, 9 years ago

Document the use of the ASDF-JAR contrib.

ASDF:ADD-TO-ASDF provides a mechanism to add the contents of a
pathname specifying an jar package to be subequently loaded by ASDF.

Generalize mechanism to specifiy contrib contents while including
"README.markdown" files.

File size: 2.2 KB
Line 
1ASDF-JAR
2========
3
4    Mark Evenson
5    Created: 20-JUN-2011
6    Modified: 20-JUN-2011
7
8ASDF-JAR provides a system for packaging ASDF systems into jar
9archives for ABCL.  Given a running ABCL image with loadable ASDF
10systems the code in this package will recursively package all the
11required source and fasls in a jar archive .
12
13To install ASDF systems, [Quicklisp]() is probably the best
14contemporary solution, although a version of ASDF-INSTALL is also
15packaged in ABCL contribs.
16
17[Quicklisp]: http://www.quicklisp.org
18
19Once the requisite ASDF systems have been installed, ensure that this
20contrib is loaded via
21
22    CL-USER) (require :abcl-contrib)
23    CL-USER> (require :asdf-jar)
24
25Then, to say package the Perl regular expression system ("CL-PPCRE"),
26one uses the ASDF-JAR:PACKAGE as follows:
27
28    CL-USER> (asdf-jar:package :cl-ppcre)
29    ;  Loading #P"/home/evenson/quicklisp/dists/quicklisp/software/cl-ppcre-2.0.3/cl-ppcre.asd" ...
30    ;  Loaded #P"/home/evenson/quicklisp/dists/quicklisp/software/cl-ppcre-2.0.3/cl-ppcre.asd" (0.029 seconds)
31    Packaging ASDF definition of #<ASDF:SYSTEM "cl-ppcre">
32     as /var/tmp/cl-ppcre-all-2.0.3.jar.
33    Packaging contents in /var/tmp/cl-ppcre-all-2.0.3.jar
34     with recursive dependencies.
35    #P"/var/tmp/cl-ppcre-all-2.0.3.jar"
36
37The resulting jar contains all source and fasls required to run the
38ASDF system including any transitive ASDF dependencies.  Each asdf
39system is packaged under its own top level directory within the jar
40archive.  The jar archive itself is numbered with the version of the
41system that was specified in the packaging.
42
43To load the system from the jar one needs to add the ASDF file
44locations to the ASDF *CENTRAL-REGISTRY*.  If one wishes to load the
45fasls from the jar alone, one needs to tell ASDF not to override its
46output translation rules.  The function ASDF-JAR:ADD-TO-JAR does both
47of these options serving as the basis for customized load strategies
48tailored to end-user deployment needs.  So, after
49
50    CL-USER> (asdf-jar:add-to-asdf "/var/tmp/cl-ppcre-all-2.0.3.jar")
51
52a subsequent
53
54    CL-USER> (asdf:load-system :cl-ppcre)
55
56should load the ASDF system from the jar.
57
58Setting CL:*LOAD-VERBOSE* will allow one to verify that the subsequent
59load is indeed coming from the jar.
Note: See TracBrowser for help on using the repository browser.