Changeset 13345
- Timestamp:
- 06/17/11 13:10:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
r13343 r13345 3 3 (:export #:package)) 4 4 5 5 6 (defpackage #:mvn 6 7 (:use :cl) 7 (:export #:satisfy)) 8 9 (in-package :abcl-asdf) 8 (:export #:satisfy 9 #:as-classpath)) 10 10 11 11 (in-package :asdf) … … 15 15 16 16 ;;; We interpret compilation to ensure that load-op will succeed 17 (defmethod perform ((op eration compile-op) (componentmvn))18 (let ((version (component-version mvn)))19 (mvn:satisfy (component-name mvn)17 (defmethod perform ((op compile-op) (c mvn)) 18 (let ((version (component-version c))) 19 (mvn:satisfy (component-name c) 20 20 :version (if version version :latest)))) 21 21 22 (defmethod perform ((operation load-op) (c omponentmvn))23 (let ((version (component-version mvn)))22 (defmethod perform ((operation load-op) (c mvn)) 23 (let ((version (component-version c))) 24 24 (java:add-to-classpath 25 (as-classpath (mvn:satisfy (component-name mvn) 26 :version (if version version :latest)))))) 25 (mvn:as-classpath 26 (mvn:satisfy (component-name c) 27 :version (if version version :latest)))))) 28 29 (in-package :abcl-asdf) 27 30 28 31 (defun decompose (iri) 32 (declare (ignore iri)) 29 33 ;;; XXX test 30 34 `((:scheme :jvm) … … 33 37 (:version "1.4.10"))) 34 38 35 (defun mvn:satisfy (name &key (version :latest)) 36 (let ((build.xml (make-temp-file))) 37 (with-open-file (s build.xml :direction :output) 38 (write-string *ant-build-template* s )) 39 (run-program 40 (format nil "ant -find ~A" build.xml)))) 39 (in-package :mvn) 40 41 (defparameter *maven-ant-tasks.jar* 42 "/export/home/evenson/src/apache-maven-3.0.3/maven-ant-tasks-2.1.1.jar") 41 43 42 44 #| … … 53 55 "<?xml version='1.0' encoding='UTF-8'?> 54 56 <project xmlns='antlib:org.apache.tools.ant' 57 xmlns:artifact='antlib:org.apache.maven.artifact.ant' 55 58 name='abcl-mvn-~A' default='install'> 56 59 … … 72 75 " (symbol-name (gensym)) "junit" "junit" "3.8.2")) 73 76 77 (defun satisfy (name &key (version :latest)) 78 (declare (ignore name version)) 79 (let ((build.xml (ext:make-temp-file))) 80 (with-open-file (s build.xml :direction :output) 81 (write-string *ant-build-template* s )) 82 (ext:run-program 83 (format nil "ant -find ~A -lib ~A" 84 build.xml 85 *maven-ant-tasks.jar*)))) 86 87 (defun as-classpath (mvn) 88 "For a given MVN entry, return a list of loadable archives 89 suitable for addition to the classpath." 90 (declare (ignore mvn)) 91 (error "unimplemented")) 92 74 93 75 94 76 95 77 78
Note: See TracChangeset
for help on using the changeset viewer.