Fix all compilation warnings.

Still not expected that ABCL-ASDF works, esp. in the use of
RUN-PROGRAM.
parent 5a2f68d7
......@@ -2,11 +2,11 @@
(:use :cl)
(:export #:package))
(defpackage #:mvn
(:use :cl)
(:export #:satisfy))
(in-package :abcl-asdf)
(:export #:satisfy
#:as-classpath))
(in-package :asdf)
(defclass iri (static-class) ())
......@@ -14,30 +14,32 @@
(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)
(defmethod perform ((op compile-op) (c mvn))
(let ((version (component-version c)))
(mvn:satisfy (component-name c)
:version (if version version :latest))))
(defmethod perform ((operation load-op) (component mvn))
(let ((version (component-version mvn)))
(defmethod perform ((operation load-op) (c mvn))
(let ((version (component-version c)))
(java:add-to-classpath
(as-classpath (mvn:satisfy (component-name mvn)
:version (if version version :latest))))))
(mvn:as-classpath
(mvn:satisfy (component-name c)
:version (if version version :latest))))))
(in-package :abcl-asdf)
(defun decompose (iri)
(declare (ignore iri))
;;; XXX test
`((:scheme :jvm)
(:authority :mvn)
(:host "log4j")
(:version "1.4.10")))
(defun mvn:satisfy (name &key (version :latest))
(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))))
(in-package :mvn)
(defparameter *maven-ant-tasks.jar*
"/export/home/evenson/src/apache-maven-3.0.3/maven-ant-tasks-2.1.1.jar")
#|
......@@ -52,6 +54,7 @@ Ant with Maven tasks would add the following
(format nil
"<?xml version='1.0' encoding='UTF-8'?>
<project xmlns='antlib:org.apache.tools.ant'
xmlns:artifact='antlib:org.apache.maven.artifact.ant'
name='abcl-mvn-~A' default='install'>
<artifact:dependencies pathId='abcl.dynamic.classpath'>
......@@ -71,8 +74,22 @@ Ant with Maven tasks would add the following
</project>
" (symbol-name (gensym)) "junit" "junit" "3.8.2"))
(defun satisfy (name &key (version :latest))
(declare (ignore name version))
(let ((build.xml (ext:make-temp-file)))
(with-open-file (s build.xml :direction :output)
(write-string *ant-build-template* s ))
(ext:run-program
(format nil "ant -find ~A -lib ~A"
build.xml
*maven-ant-tasks.jar*))))
(defun as-classpath (mvn)
"For a given MVN entry, return a list of loadable archives
suitable for addition to the classpath."
(declare (ignore mvn))
(error "unimplemented"))
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