Changeset 13867


Ignore:
Timestamp:
02/08/12 08:21:35 (9 years ago)
Author:
Mark Evenson
Message:

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

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

Legend:

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

    r13865 r13867  
    2222
    2323    (defsystem log4j
    24       :components ((:mvn "log4j/log4j/1.4.9")))
     24      :components ((:mvn "log4j/log4j/1.2.13")))
    2525
    2626After issuing
     
    3232
    3333    (let ((logger (#"getLogger" 'log4j.Logger (symbol-name (gensym)))))
    34       (#"trace" logger "Kilroy wuz here.")))
     34      (#"trace" logger "Kilroy wuz here."))
    3535 
    36  output the message "Kilroy wuz here" to the log4j logging system.
     36output the message "Kilroy wuz here" to the log4j logging system.
    3737     
    3838
     
    4141
    4242We define an API within the ASDF package consisting of the following
    43 ASDF classes:
     43ASDF classes derived from ASDF:COMPONENT:
    4444
    4545JAR-DIRECTORY, JAR-FILE, and CLASS-FILE-DIRECTORY for JVM artifacts
    46 that have a currently valid pathname representation
     46that have a currently valid pathname representation (i.e. they exist
     47on the local filesystem).
    4748
    48 And the MVN and IRI classes descend from ASDF-COMPONENT, but do not
     49And we define MVN and IRI classes descend from ASDF-COMPONENT, but do not
    4950directly have a filesystem location.
    5051
     
    5253ABCL-ASDF:RESOLVE which locates, downloads, caches, and then loads
    5354into the currently executing JVM process all recursive dependencies
    54 annotated in the Maven pom.xml graph.
     55annotated in the ditributed Maven pom.xml graph.
    5556
    5657One can muffle the verbosity of the Maven Aether resolver by setting
     
    7576
    7677    CL-USER> (java:add-to-classpath (abcl-asdf:as-classpath (abcl-asdf:resolve "com.google.gwt:gwt-user")))
    77 
    78 
    7978
    8079Example 3
     
    142141Plausibly work under MSFT operating systems.
    143142
    144 Working with maven-3.0.4 and working in more places.
     143Working with maven-3.0.4.
    145144
    146145### 0.5.0 2012-01-22
  • trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp

    r13865 r13867  
    3232(defun maybe-parse-mvn (component)
    3333  (with-slots (asdf::name asdf::group-id asdf::artifact-id
    34                asdf::version asdf::schema asdf::path) component
     34               asdf::version asdf::schema asdf::path)
     35      component
    3536    (when (null asdf::artifact-id)
    36       (let ((slash (search "/" name)))
    37         (unless (and (integerp slash)
    38                      asdf::version)
     37      (let ((parsed (abcl-asdf::split-string name "/")))
     38         (unless (or (= (length parsed) 3)
     39                     (and (= (length parsed) 2)
     40                          asdf::version))
    3941          (error "Failed to construct a mvn reference from name '~A' and version '~A'"
    40                  asdf::name asdf::version))
    41         (setf asdf::group-id (subseq asdf::name 0 slash)
    42               asdf::artifact-id (subseq asdf::name (1+ slash))
    43               asdf::schema "mvn"
    44               asdf::version (if (eq asdf::version :latest)
    45                                 "LATEST"
    46                                 asdf::version)
    47               asdf::path (format nil "~A/~A" asdf::name asdf::version))))))
     42                 asdf::name
     43                 (if asdf::version
     44                     asdf::version
     45                     "UNSPECIFED")))
     46         (setf asdf::group-id (first parsed)
     47               asdf::artifact-id (second parsed)
     48               asdf::schema "mvn"
     49               asdf::version (if (third parsed)
     50                                 (third parsed)
     51                                 "LATEST"))
     52         (setf asdf::path (format nil "~A/~A" asdf::name asdf::version))))))
    4853
    4954(defmethod source-file-type ((component iri) (system system))
  • trunk/abcl/contrib/abcl-asdf/tests/log4j.asd

    r13550 r13867  
    55  :components
    66  ((:module log4j.jar :components
    7             ((:mvn "log4j/log4j" :version "1.2.15")))
     7            ((:mvn "log4j/log4j/1.2.15")))
    88   (:module source :pathname "" :components
    99            ((:file "example"))
Note: See TracChangeset for help on using the changeset viewer.