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

Fix all compilation warnings.

Still not expected that ABCL-ASDF works, esp. in the use of
RUN-PROGRAM.

File:
1 edited

Legend:

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

    r13343 r13345  
    33  (:export #:package))
    44
     5
    56(defpackage #:mvn
    67  (:use :cl)
    7   (:export #:satisfy))
    8 
    9 (in-package :abcl-asdf)
     8  (:export #:satisfy
     9           #:as-classpath))
    1010
    1111(in-package :asdf)
     
    1515
    1616;;; We interpret compilation to ensure that load-op will succeed
    17 (defmethod perform ((operation compile-op) (component mvn))
    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)
    2020                   :version (if version version :latest))))
    2121
    22 (defmethod perform ((operation load-op) (component mvn))
    23     (let ((version (component-version mvn)))
     22(defmethod perform ((operation load-op) (c mvn))
     23    (let ((version (component-version c)))
    2424      (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)
    2730
    2831(defun decompose (iri)
     32  (declare (ignore iri))
    2933  ;;; XXX test
    3034  `((:scheme :jvm)
     
    3337    (:version "1.4.10")))
    3438
    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")
    4143
    4244#|
     
    5355  "<?xml version='1.0' encoding='UTF-8'?>
    5456<project xmlns='antlib:org.apache.tools.ant'
     57         xmlns:artifact='antlib:org.apache.maven.artifact.ant'
    5558         name='abcl-mvn-~A' default='install'>
    5659
     
    7275" (symbol-name (gensym)) "junit" "junit" "3.8.2"))
    7376
     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                       
    7493
    7594
    7695
    77  
    78 
Note: See TracChangeset for help on using the changeset viewer.