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.
parent 392d77fb
......@@ -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."
......
......@@ -368,3 +368,10 @@ in Java CLASSPATH representation."
#'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)))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment