Rough cut of what declaring Maven dependencies in ASDF would be like.

parent 956d7e8e
;;;; -*- Mode: LISP -*-
(in-package :asdf)
(defsystem :abcl-asdf
:author "Mark Evenson"
:version "0.1.0"
((:module base :pathname "" :components
((:file "abcl-asdf")))))
\ No newline at end of file
(defpackage #:abcl-asdf
(:use :cl)
(:export #:package))
(in-package :asdf-jar)
(in-package :asdf)
(defclass iri (static-class) ())
(defclass mvn (iri) ())
;;; We interpret compilation to ensure that load-op will succeed
(defmethod perform ((operation compile-op) (component mvn))
(let ((version (component-version mvn)))
(mvn:satisfy (component-name mvn)
:version (if version version :latest))))
(defmethod perform ((operation load-op) (component mvn))
(let ((version (component-version mvn)))
(as-classpath (mvn:satisfy (component-name mvn)
:version (if version version :latest))))))
(defun decompose (iri)
;;; XXX test
`((:scheme :jvm)
(:authority :mvn)
(:host "log4j")
(:version "1.4.10")))
(defun mvn:satisfy (name &key (version :latest))
;;; XXX either invoke mvn in the same jvm or fork a process)
(require :jss)
(let ((logger (#"getLogger" 'Logger (symbol-name (gensym)))))
(#"log" logger "Kilroy wuz here."))
;;;; -*- Mode: LISP -*-
(in-package :asdf)
(defsystem :log4j
((:mvn "log4j" :version "1.4.9")
(:module src :pathname "")
((:file "example"))))
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