Changeset 13342


Ignore:
Timestamp:
06/17/11 10:11:24 (12 years ago)
Author:
Mark Evenson
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp

    r13340 r13342  
    22  (:use :cl)
    33  (:export #:package))
     4
     5(defpackage #:mvn
     6  (:use :cl)
     7  (:export #:satisfy))
    48
    59(in-package :asdf-jar)
     
    913
    1014(defclass mvn (iri) ())
     15
    1116
    1217;;; We interpret compilation to ensure that load-op will succeed
     
    3035
    3136(defun mvn:satisfy (name &key (version :latest))
    32   ;;; XXX either invoke mvn in the same jvm or fork a process)
     37  (let ((build.xml (make-temp-file)))
     38    (with-open-file (s build.xml :direction :output)
     39      (write-string *ant-build-template* s ))
     40    (run-program
     41     (format nil "ant -find ~A" build.xml))))
     42
     43#|
     44
     45Ant with Maven tasks would add the following
     46
     47  <artifact:dependencies pathId="abcl.dynamic.classpath">
     48    <dependency groupId="junit" artifactId="junit" version="3.8.2"/>
     49  </artifact:dependencies>
     50|#
     51
     52(defvar *ant-build-template*
     53  (format nil
     54  "<?xml version='1.0' encoding='UTF-8'?>
     55<project xmlns='antlib:org.apache.tools.ant'
     56         name='abcl-mvn-~A' default='install'>
     57
     58  <artifact:dependencies pathId='abcl.dynamic.classpath'>
     59    <dependency groupId='~A' artifactId='~A' version='~A'/>
     60  </artifact:dependencies>
     61
     62  <path id='abcl.jar'>
     63    <pathelement location='/export/home/evenson/work/abcl/dist/abcl.jar'/>
     64  </path>
     65
     66  <target name='install'>
     67    <java classname='org.armedbear.lisp.Main'>
     68      <classpath refid='abcl.jar'>
     69      <classpath refid='abcl.dynamic.classpath'>
     70    </java>
     71  </target>
     72</project>
     73" (symbol-name (gensym)) "junit" "junit" "3.8.2"))
     74
     75
     76
     77
     78 
     79
Note: See TracChangeset for help on using the changeset viewer.