Implementation strategy: use the Maven Ant tasks to drive via build.xml.

parent a5664d0e
......@@ -2,6 +2,10 @@
(:use :cl)
(:export #:package))
(defpackage #:mvn
(:use :cl)
(:export #:satisfy))
(in-package :asdf-jar)
(in-package :asdf)
......@@ -9,6 +13,7 @@
(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)))
......@@ -29,4 +34,46 @@
(:version "1.4.10")))
(defun mvn:satisfy (name &key (version :latest))
;;; XXX either invoke mvn in the same jvm or fork a process)
(let ((build.xml (make-temp-file)))
(with-open-file (s build.xml :direction :output)
(write-string *ant-build-template* s ))
(run-program
(format nil "ant -find ~A" build.xml))))
#|
Ant with Maven tasks would add the following
<artifact:dependencies pathId="abcl.dynamic.classpath">
<dependency groupId="junit" artifactId="junit" version="3.8.2"/>
</artifact:dependencies>
|#
(defvar *ant-build-template*
(format nil
"<?xml version='1.0' encoding='UTF-8'?>
<project xmlns='antlib:org.apache.tools.ant'
name='abcl-mvn-~A' default='install'>
<artifact:dependencies pathId='abcl.dynamic.classpath'>
<dependency groupId='~A' artifactId='~A' version='~A'/>
</artifact:dependencies>
<path id='abcl.jar'>
<pathelement location='/export/home/evenson/work/abcl/dist/abcl.jar'/>
</path>
<target name='install'>
<java classname='org.armedbear.lisp.Main'>
<classpath refid='abcl.jar'>
<classpath refid='abcl.dynamic.classpath'>
</java>
</target>
</project>
" (symbol-name (gensym)) "junit" "junit" "3.8.2"))
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