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

Last change on this file since 14171 was 13867, checked in by Mark Evenson, 10 years ago

abcl-asdf: fix logic for dealing with ASDF::MVN entries without ASDF::VERSION.

File size: 5.4 KB
Line 
1ABCL-ASDF
2=========
3
4To use:
5
6    CL-USER> (require 'abcl-contrib)
7
8    CL-USER> (require 'abcl-asdf)
9   
10   
11ABCL specific contributions to ASDF system definition mainly concerned
12with finding JVM artifacts such as jar archives to be dynamically loaded.
13
14Example 1
15---------
16
17For the following ASDF definition stored in a file named "log4j.asd"
18that loadable by ASDF
19
20    ;;;; -*- Mode: LISP -*-
21    (in-package :asdf)
22
23    (defsystem log4j
24      :components ((:mvn "log4j/log4j/1.2.13")))
25
26After issuing
27
28    CL-USER> (asdf:load-system :log4j)
29   
30all the Log4j libraries would be dynamically added to the classpath so
31that the following code would
32
33    (let ((logger (#"getLogger" 'log4j.Logger (symbol-name (gensym)))))
34      (#"trace" logger "Kilroy wuz here."))
35 
36output the message "Kilroy wuz here" to the log4j logging system.
37     
38
39API
40---
41
42We define an API within the ASDF package consisting of the following
43ASDF classes derived from ASDF:COMPONENT:
44
45JAR-DIRECTORY, JAR-FILE, and CLASS-FILE-DIRECTORY for JVM artifacts
46that have a currently valid pathname representation (i.e. they exist
47on the local filesystem).
48
49And we define  MVN and IRI classes descend from ASDF-COMPONENT, but do not
50directly have a filesystem location.
51
52For use outside of ASDF, we currently define the generic function
53ABCL-ASDF:RESOLVE which locates, downloads, caches, and then loads
54into the currently executing JVM process all recursive dependencies
55annotated in the ditributed Maven pom.xml graph.
56
57One can muffle the verbosity of the Maven Aether resolver by setting
58ABCL-ASDF:*MAVEN-VERBOSE* to NIL.
59
60Example 2
61---------
62
63Bypassing ASDF, one can directly issue requests for the Maven
64artifacts to be downloaded
65
66    CL-USER> (abcl-asdf:resolve "com.google.gwt:gwt-user")
67    WARNING: Using LATEST for unspecified version.
68    "/Users/evenson/.m2/repository/com/google/gwt/gwt-user/2.4.0-rc1/gwt-user-2.4.0-rc1.jar:/Users/evenson/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/Users/evenson/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar"
69
70Notice that all recursive dependencies have been located and installed
71as well.
72
73ABCL-ASDF:RESOLVE does not added the resolved dependencies to the
74current JVM classpath.  Use JAVA:ADD-TO-CLASSPATH as follows to do
75that:
76
77    CL-USER> (java:add-to-classpath (abcl-asdf:as-classpath (abcl-asdf:resolve "com.google.gwt:gwt-user")))
78
79Example 3
80---------
81
82For a filesystem of jar archives:
83
84    ./lib/ext/flora2-reasoner/XSBFlora.jar
85    ./lib/ext/iris-reasoner/iris/iris-0.58.jar
86    ./lib/ext/iris-reasoner/jgrapht/jgrapht-jdk1.5-0.7.1.jar
87    ./lib/ext/log4j/log4j-1.2.14.jar
88    ./lib/ext/mandrax-reasoner/commons-collections-2.1.jar
89    ./lib/ext/mandrax-reasoner/jdom-b10.jar
90    ./lib/ext/mandrax-reasoner/log4j-1.2.8.jar
91    ./lib/ext/mandrax-reasoner/mandarax-3.4.jar
92    ./lib/ext/mins-reasoner/mins-v0_3.jar
93    ./lib/ext/pellet-reasoner/aterm/1.6/aterm-java-1.6.jar
94    ./lib/ext/pellet-reasoner/commons-logging/1.1/commons-logging-1.1.jar
95    ./lib/ext/pellet-reasoner/kaon/1.2.9/rdfapi.jar
96    ./lib/ext/pellet-reasoner/owl-api/1.4.3/abstractparser.jar
97    ./lib/ext/pellet-reasoner/owl-api/1.4.3/io.jar
98    ./lib/ext/pellet-reasoner/owl-api/1.4.3/rdfparser.jar
99    ./lib/ext/pellet-reasoner/owl-api/1.4.3/validation.jar
100    ./lib/ext/pellet-reasoner/owl-api/owl-api-econn/2006-04-27/api.jar
101    ./lib/ext/pellet-reasoner/owl-api/owl-api-econn/2006-04-27/impl.jar
102    ./lib/ext/pellet-reasoner/pellet/pellet.jar
103    ./lib/ext/pellet-reasoner/relaxng/1.0/relaxngDatatype.jar
104    ./lib/ext/pellet-reasoner/xsdlib/xsdlib.jar
105    ./lib/ext/wsmo/WSML-grammar-20081202.jar
106    ./lib/ext/wsmo/wsmo-api-0.6.2.jar
107    ./lib/ext/wsmo/wsmo4j-0.6.2.jar
108    ./lib/ext/xsb-system/interprolog.jar
109
110The following ASDF defintion loads enough JVM artifacts to use the
111[IRIS reasoner][1]:
112
113    (defsystem :wsml2reasoner-jars
114      :version "0.6.4"  ;; last sync with SVN
115      :depends-on (:abcld) :components
116    ((:module wsml2reasoner
117      :pathname "lib/" :components
118      ((:jar-file "wsml2reasoner")))
119      (:module iris-libs
120        :pathname "lib/ext/iris-reasoner/iris/" :components
121      ((:jar-file "iris-0.58")))
122      (:module jgrapht-libs
123      :pathname "lib/ext/iris-reasoner/jgrapht/" :components
124      ((:jar-file "jgrapht-jdk1.5-0.7.1")))
125      (:module wsmo-libs
126      :pathname "lib/ext/wsmo/" :components
127      ((:jar-file "WSML-grammar-20081202")
128       (:jar-file "wsmo-api-0.6.2")
129       (:jar-file "wsmo4j-0.6.2")))
130      (:module log4j-libs
131         :pathname "lib/ext/log4j/" :components
132       ((:jar-file "log4j-1.2.14")))))
133
134[1]:  http://www.iris-reasoner.org/
135
136Releases
137--------
138
139### 0.7.0 2012-02-05
140
141Plausibly work under MSFT operating systems.
142
143Working with maven-3.0.4.
144
145### 0.5.0 2012-01-22
146
147   o  just bless this as a release to stablize its offered API "as is"
148   
149   o  definitely failing under MSFT
150   
151   o  ASDF version has to be a three value integer (i.e. no "-snapshot"
152      after version).  Should be fixed with appropiate :AROUND method
153      as implementation specific monkeypatch.
154       
155
156### 0.4.1 2011-09-06
157
158    o  locating the proper Maven3 libraries could work in more places
159   
160    o  untested under Windows
161   
162    o  more information should be optionally available when downloading
163       as this process can potentially take a long time.
164
165
166#### Colophon
167
168    Mark <evenson.not.org@gmail.com>
169   
170    Created: 2011-01-01
171    Revised: 2012-02-06
172   
Note: See TracBrowser for help on using the repository browser.