[armedbear-cvs] r13903 - trunk/abcl/contrib/abcl-asdf

mevenson at common-lisp.net mevenson at common-lisp.net
Sun Apr 1 19:15:40 UTC 2012


Author: mevenson
Date: Sun Apr  1 12:15:39 2012
New Revision: 13903

Log:
abcl-asdf: Final touches on 0.8.0.

Modified:
   trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
   trunk/abcl/contrib/abcl-asdf/packages.lisp

Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp	Sun Apr  1 12:15:37 2012	(r13902)
+++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp	Sun Apr  1 12:15:39 2012	(r13903)
@@ -23,25 +23,31 @@
 
 ;;; We intercept compilation to ensure that load-op will succeed
 (defmethod perform ((op compile-op) (c mvn))
-  (maybe-parse-mvn c)
+  (ensure-parsed-mvn c)
   (abcl-asdf:resolve c))
      
 (defmethod perform ((operation load-op) (c mvn))
-  (maybe-parse-mvn c)
+  (ensure-parsed-mvn c)
   (java:add-to-classpath 
    (abcl-asdf:as-classpath 
     (abcl-asdf:resolve c))))
 
 ;;; A Maven URI has the form "mvn:group-id/artifact-id/version"
 ;;;
+;;; Sometimes people write "group-id:artifact-id:version" to refer to
+;;; Maven artifacts.  One can use ABCL-ASDF:RESOLVE directly for
+;;; serialized references to artifacts of this form.
+;;;
 ;;; Currently we "stuff" the group-id/artifact-id into the 'name' and
 ;;; use the component 'version' for the version.  Parts of ASDF 
 ;;; *reallY* want ASDF:VERSION to be a triple of intergers, and never
 ;;; anything more, so that is part of the motivation behind this effort.
-;;; ??? rename me to ENSURE-MVN-PARSE ??
-(defun maybe-parse-mvn (component)
+(defparameter *mvn-repositories* nil
+  "A list of all Maven repositories encountered in the lifetime of this instance of the implementation.")
+
+(defun ensure-parsed-mvn (component)
   (with-slots (name group-id artifact-id
-               version schema path) 
+               version schema path repository) 
       component
     (when (null asdf::artifact-id) 
       (let ((parsed (abcl-asdf::split-string name "/"))
@@ -63,6 +69,7 @@
                (error "Failed to construct a mvn reference from name '~A' and version '~A'"
                       name version)))
         (setf schema "mvn")
+        (pushnew repository *mvn-repositories*)
         ;;; Always normalized path "on the way out" to contain group-id/artifact-id/version
         (setf path (format nil "~A/~A/~A" group-id artifact-id version))))))
 

Modified: trunk/abcl/contrib/abcl-asdf/packages.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/packages.lisp	Sun Apr  1 12:15:37 2012	(r13902)
+++ trunk/abcl/contrib/abcl-asdf/packages.lisp	Sun Apr  1 12:15:39 2012	(r13903)
@@ -13,6 +13,10 @@
 
    #:init
 
+;;; ASDF
+;;;   #:iri #:mvn
+;;;   #:ensure-parsed-mvn
+
 ;;; "Internal" API
 
 ;;;; Maven 




More information about the armedbear-cvs mailing list