Changeset 13865


Ignore:
Timestamp:
02/07/12 14:53:22 (11 years ago)
Author:
Mark Evenson
Message:

abcl-asdf: Rename SATISFY to RESOLVE.

Re-jiggle the exported symbols

Sharpen documentation, adding docstrings. Freshen README.markdown.

Location:
trunk/abcl/contrib/abcl-asdf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-asdf/README.markdown

    r13804 r13865  
    1212with finding JVM artifacts such as jar archives to be dynamically loaded.
    1313
    14 Examples
    15 --------
     14Example 1
     15---------
     16
     17For the following ASDF definition stored in a file named "log4j.asd"
     18that loadable by ASDF
    1619
    1720    ;;;; -*- Mode: LISP -*-
    1821    (in-package :asdf)
    1922
    20     (defsystem :log4j
    21       :components ((:mvn "log4j/log4j"
    22                     :version "1.4.9")))
     23    (defsystem log4j
     24      :components ((:mvn "log4j/log4j/1.4.9")))
     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 
     36 output the message "Kilroy wuz here" to the log4j logging system.
     37     
    2338
    2439API
    2540---
    2641
    27 We define an API as consisting of the following ASDF classes:
     42We define an API within the ASDF package consisting of the following
     43ASDF classes:
    2844
    2945JAR-DIRECTORY, JAR-FILE, and CLASS-FILE-DIRECTORY for JVM artifacts
     
    3349directly have a filesystem location.
    3450
    35 For use outside of ASDF, we currently define one method,
    36 RESOLVE-DEPENDENCIES which locates, downloads, caches, and then loads
     51For use outside of ASDF, we currently define the generic function
     52ABCL-ASDF:RESOLVE which locates, downloads, caches, and then loads
    3753into the currently executing JVM process all recursive dependencies
    3854annotated in the Maven pom.xml graph.
     55
     56One can muffle the verbosity of the Maven Aether resolver by setting
     57ABCL-ASDF:*MAVEN-VERBOSE* to NIL.
    3958
    4059Example 2
     
    4463artifacts to be downloaded
    4564
    46     CL-USER> (abcl-asdf:resolve-dependencies "com.google.gwt" "gwt-user")
     65    CL-USER> (abcl-asdf:resolve "com.google.gwt:gwt-user")
    4766    WARNING: Using LATEST for unspecified version.
    4867    "/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"
     
    5069Notice that all recursive dependencies have been located and installed
    5170as well.
     71
     72ABCL-ASDF:RESOLVE does not added the resolved dependencies to the
     73current JVM classpath.  Use JAVA:ADD-TO-CLASSPATH as follows to do
     74that:
     75
     76    CL-USER> (java:add-to-classpath (abcl-asdf:as-classpath (abcl-asdf:resolve "com.google.gwt:gwt-user")))
     77
    5278
    5379
     
    103129       (:jar-file "wsmo-api-0.6.2")
    104130       (:jar-file "wsmo4j-0.6.2")))
    105       (:module log4j-libs
    106   :pathname "lib/ext/log4j/" :components
    107         ((:jar-file "log4j-1.2.14")))))
     131      (:module log4j-libs 
     132        :pathname "lib/ext/log4j/" :components
     133       ((:jar-file "log4j-1.2.14")))))
    108134
    109135[1]:  http://www.iris-reasoner.org/
    110136
     137Releases
     138--------
    111139
    112 Problems
    113 --------
     140### 0.7.0 2012-02-05
     141
     142Plausibly work under MSFT operating systems.
     143
     144Working with maven-3.0.4 and working in more places.
    114145
    115146### 0.5.0 2012-01-22
     
    139170   
    140171    Created: 2011-01-01
    141     Revised: 2012-01-24
     172    Revised: 2012-02-06
    142173   
  • trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp

    r13863 r13865  
    1818(defmethod perform ((op compile-op) (c mvn))
    1919  (maybe-parse-mvn c)
    20   (abcl-asdf:satisfy c))
     20  (abcl-asdf:resolve c))
    2121     
    2222(defmethod perform ((operation load-op) (c mvn))
     
    2424  (java:add-to-classpath
    2525   (abcl-asdf:as-classpath
    26     (abcl-asdf:satisfy c))))
     26    (abcl-asdf:resolve c))))
    2727
    2828;;; A Maven URI has the form "mvn:group-id/artifact-id/version"
     
    5555(in-package #:abcl-asdf)
    5656
    57 (defgeneric satisfy (something)
     57(defgeneric resolve (something)
    5858 (:documentation "Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string."))
    5959
    60 (defmethod satisfy ((mvn-component asdf::mvn))
     60(defmethod resolve ((mvn-component asdf::mvn))
    6161  "Resolve all runtime dependencies of MVN-COMPONENT.
    6262
  • trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp

    r13863 r13865  
    44#|
    55
    6 # Implementation references
     6# Implementation
     7
     8Not multi-threaded safe, and unclear how much work that would be.
    79
    810## Installing Maven
     11http://maven.apache.org/download.html
    912
    1013## Current Javadoc for Maven Aether connector
     
    1316## Incomplete, seemingly often wrong
    1417https://docs.sonatype.org/display/AETHER/Home
     18
     19Note that this is not an implementation of Maven per se, but the use
     20of the Maven Aether connector infrastructure.  Among other things, this means
     21that the Maven specific "~/.m2/settings.xml" file is NOT parsed for settings.
    1522
    1623|#
     
    369376
    370377         
    371 ;;; "log4j:log4j:1.9.2" or "log4j:log4j"
    372 (defmethod satisfy ((string t))
     378(defmethod resolve ((string t))
     379  "Resolve a colon separated GROUP-ID:ARTIFACT-ID[:VERSION] reference to a Maven artifact.
     380
     381Examples of artifact references: \"log4j:log4j:1.2.14\" for
     382'log4j-1.2.14.jar'.  Resolving \"log4j:log4j\" would return the latest
     383version of the artifact known to the distributed Maven pom.xml graph.
     384
     385Returns a string containing the necessary classpath entries for this
     386artifact and all of its transitive dependencies."
    373387  (let ((result (split-string string ":")))
    374388    (cond
  • trunk/abcl/contrib/abcl-asdf/packages.lisp

    r13841 r13865  
    33  (:export
    44;;; Public API
     5   #:resolve
     6
    57   #:resolve-dependencies
     8   #:resolve-artifact
    69
    710   #:find-mvn
     
    2326   #:resolve-dependencies
    2427
    25    #:satisfy
    2628   #:as-classpath
    2729
Note: See TracChangeset for help on using the changeset viewer.