Changeset 14742


Ignore:
Timestamp:
01/05/15 17:35:59 (8 years ago)
Author:
Mark Evenson
Message:

abcl-asdf: maven artifact/dependency enhancements.

  • ensure-parsed-mvn now returns the repository as the last element of the path
  • resolve-dependencies now takes version and repository arguments as

keywords instead of optional args

  • resolve-dependencies now uses the repository from the maven path
Location:
trunk/abcl/contrib/abcl-asdf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp

    r14631 r14742  
    8484        (setf schema "mvn")
    8585        (pushnew repository *mvn-repositories*)
    86         ;;; Always normalized path "on the way out" to contain group-id/artifact-id/version
     86        ;;; Always set path to normalized path "on the way out" to
     87        ;;; contain group-id/artifact-id/version
     88        ;;; TODO? record repository as well in path of component
    8789        (setf path (format nil "~A/~A/~A" group-id artifact-id version))))
    8890    component))
  • trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp

    r14733 r14742  
    367367
    368368;;; TODO change this to work on artifact strings like log4j:log4j:jar:1.2.16
    369 (defun resolve-artifact (group-id artifact-id &optional (version "LATEST" versionp))
     369(defun resolve-artifact (group-id artifact-id &key (version "LATEST" versionp))
    370370  "Resolve artifact to location on the local filesystem.
    371371
     
    420420
    421421(defun resolve-dependencies (group-id artifact-id
    422                              &optional  ;;; XXX Uggh.  Move to keywords when we get the moxie.
     422                             &key
    423423                             (version "LATEST" versionp)
    424424                             (repository *maven-remote-repository* repository-p))
     
    517517      ((= (length result) 3)
    518518       (resolve-dependencies
    519         (first result) (second result) (third result)))
     519        (first result) (second result) :version (third result)))
    520520      ((string= string "com.sun.jna:jna")
    521521       (warn "Replacing request for no longer available com.sun.jna:jna with net.java.dev.jna:jna")
    522        (resolve-dependencies "net.java.dev.jna" "jna" "LATEST"))
     522       (resolve-dependencies "net.java.dev.jna" "jna" :version "LATEST"))
    523523      ((= (length result) 2)
    524524       (resolve-dependencies
    525525        (first result) (second result)))
    526526      (t
    527        (setf result
    528              (apply #'resolve-dependencies (split-string string "/")))))))
     527       (destructuring-bind (group-id artifact-id &optional version repository)
     528           (split-string string "/")
     529         (setf result
     530               (apply #'resolve-dependencies group-id artifact-id
     531                      (append (when version
     532                                `(:version ,version))
     533                              (when repository
     534                                `(:repository ,repository))))))))))
    529535 
    530536;;; Currently the last file listed in ASDF
Note: See TracChangeset for help on using the changeset viewer.