Ignore:
Timestamp:
04/01/12 20:39:17 (9 years ago)
Author:
Mark Evenson
Message:

abcl-asdf: refactor interface.

ENSURE-REMOTE-REPOSITORY now takes a keyword to specify the remote
repository to create. RESOLVE-DEPENDENCIES should now use this
mechanism to specify the remote repository.

The ASDF syntax of adding a :repository doesn't seem to be working.

File:
1 edited

Legend:

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

    r13903 r13904  
    22;;;;
    33;;;; Done separate from asdf.lisp for stability.
     4(require :asdf)
    45(in-package :asdf)
    56
     
    1213
    1314(defclass mvn (iri)
    14   ((group-id :initform nil)
    15    (artifact-id :initform nil)
     15  ((group-id :initarg :group-id :initform nil)
     16   (artifact-id :initarg :artifact-id :initform nil)
    1617   (repository :initform "http://repo1.maven.org/maven2/") ;;; XXX unimplmented
    1718;; inherited from ASDF:COMPONENT ??? what are the CL semantics on overriding -- ME 2012-04-01
     
    2223  component)
    2324
     25
    2426;;; We intercept compilation to ensure that load-op will succeed
    2527(defmethod perform ((op compile-op) (c mvn))
    26   (ensure-parsed-mvn c)
    27   (abcl-asdf:resolve c))
     28  (abcl-asdf:resolve   
     29   (ensure-parsed-mvn c)))
    2830     
    2931(defmethod perform ((operation load-op) (c mvn))
    30   (ensure-parsed-mvn c)
    3132  (java:add-to-classpath
    3233   (abcl-asdf:as-classpath
    33     (abcl-asdf:resolve c))))
     34    (abcl-asdf:resolve
     35     (ensure-parsed-mvn c)))))
    3436
    3537;;; A Maven URI has the form "mvn:group-id/artifact-id/version"
     
    4547(defparameter *mvn-repositories* nil
    4648  "A list of all Maven repositories encountered in the lifetime of this instance of the implementation.")
     49
     50#+nil
     51(defmethod slot-missing ((class mvn) object slot-name operation &optional new-value)
     52  (setf (slot-value object slot-name)
     53        (if new-value
     54            new-value
     55            nil)))
    4756
    4857(defun ensure-parsed-mvn (component)
     
    7281        (pushnew repository *mvn-repositories*)
    7382        ;;; Always normalized path "on the way out" to contain group-id/artifact-id/version
    74         (setf path (format nil "~A/~A/~A" group-id artifact-id version))))))
     83        (setf path (format nil "~A/~A/~A" group-id artifact-id version))))
     84    component))
     85
     86(export `(mvn iri ensure-parsed-mvn
     87              group-id artifact-id version) 'asdf)
    7588
    7689(defmethod source-file-type ((component iri) (system system))
Note: See TracChangeset for help on using the changeset viewer.