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

mevenson at common-lisp.net mevenson at common-lisp.net
Mon Feb 6 18:20:26 UTC 2012


Author: mevenson
Date: Mon Feb  6 10:20:25 2012
New Revision: 13862

Log:
Make ABCL-ASDF:SATISFY a generic function, override it to interpret mvn artifact streams.

Now something like

    (satisfy "logj:log4j")

will return the necessary classpath entries to add these dependencies
specified by the Maven pom.xml graph in the hosting JVM process.

Modified:
   trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
   trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp

Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp	Mon Feb  6 10:20:23 2012	(r13861)
+++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp	Mon Feb  6 10:20:25 2012	(r13862)
@@ -14,7 +14,7 @@
 (defmethod find-component ((component iri) path)
   component)
 
-;;; We interpret compilation to ensure that load-op will succeed
+;;; We intercept compilation to ensure that load-op will succeed
 (defmethod perform ((op compile-op) (c mvn))
   (maybe-parse-mvn c)
   (abcl-asdf:satisfy c))
@@ -54,7 +54,10 @@
 
 (in-package #:abcl-asdf)
 
-(defun satisfy (mvn-component)
+(defgeneric satisfy (something)
+ :documentation "Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string."
+
+(defmethod satisfy ((mvn-component asdf::mvn))
   "Resolve all runtime dependencies of MVN-COMPONENT.
 
 Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string."

Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp	Mon Feb  6 10:20:23 2012	(r13861)
+++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp	Mon Feb  6 10:20:25 2012	(r13862)
@@ -368,3 +368,10 @@
      #'log)))
 
          
+;;; "log4j:log4j:1.9.2" or "log4j:log4j"
+(defmethod satisfy ((string t))
+  (let ((result (split-string string ":")))
+    (cond 
+      ((<= 2 (length result) 3)
+       (apply #'resolve-dependencies result)))))
+  




More information about the armedbear-cvs mailing list