Changeset 14504


Ignore:
Timestamp:
05/21/13 12:04:57 (10 years ago)
Author:
Mark Evenson
Message:

Promote ABCL-ASDF:ENSURE-MVN-VERSION as primary API that Maven can be executed.

Returns the found (MAJOR MINOR PATCH) as the second value.

Adding support for test framework (use :RT).

Location:
trunk/abcl/contrib/abcl-asdf
Files:
6 edited

Legend:

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

    r14305 r14504  
    33(asdf:defsystem :abcl-asdf
    44  :author "Mark Evenson"
    5   :version "1.1.0"
    6   :description "<> asdf:defsystem <urn:abcl.org/release/1.1.0/contrib/abcl-asdf#1.1.0>"
     5  :version "1.2.0"
     6  :description "<> asdf:defsystem <urn:abcl.org/release/1.2.0/dev/contrib/abcl-asdf#1.1.0>"
    77  :depends-on (jss)
    88  :components
     
    2121(asdf:defsystem :abcl-asdf-test
    2222  :author "Mark Evenson"
    23   :depends-on (abcl abcl-test-lisp abcl-asdf)
     23  :depends-on (abcl abcl-test-lisp abcl-asdf rt)
    2424  :components ((:module tests :serial t
    2525                        :components ((:file "example")
     
    2727                                     (:file "test")))))
    2828
    29 #|
    30 (defmethod perform ((o test-op) (c (eql (find-system 'abcl-asdf-test))))
     29
     30(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system 'abcl-asdf-test))))
    3131  (funcall (intern (symbol-name 'run) 'abcl-asdf-test)))
    3232
    33 (defmethod perform ((o test-op) (c (eql (find-system 'abcl-asdf))))
    34   (asdf:load-system :abcl-asdf-test))
     33(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system 'abcl-asdf))))
     34  (asdf:load-system :abcl-asdf-test)
    3535  (asdf:test-system :abcl-asdf-test))
    3636
    3737 ;;; FIXME
    38 (defmethod perform ((o test-op) (c (eql (find-system 'abcl-asdf))))
     38#+nil
     39(defmethod asdf:perform ((o asdf:test-op) (c (eql (asdf:find-system 'abcl-asdf))))
    3940   "Invoke tests with (asdf:test-system 'abcl-asdf)."
    4041   (asdf:load-system 'abcl)
     
    4243   (asdf:load-system 'abcl-asdf-test)
    4344   (funcall (intern (symbol-name 'run) 'abcl-asdf-test)))
    44 |#
     45
  • trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp

    r14364 r14504  
    5252
    5353Returns the path of the Maven executable or nil if none are found.
     54
     55Returns the version of Maven found as the second value.
    5456
    5557Emits warnings if not able to find a suitable executable."
     
    6769             (mvn (truename mvn-path)))
    6870        (if mvn
    69             (return-from find-mvn mvn)
     71            (values (return-from find-mvn mvn)
     72                    (ensure-mvn-version))
    7073            (warn "M2_HOME was set to '~A' in the process environment but '~A' doesn't exist."
    7174                  m2-home mvn-path))))
     
    7578             (mvn (truename mvn-path)))
    7679        (if mvn
    77             (return-from find-mvn mvn)
     80            (values (return-from find-mvn mvn)
     81                    (ensure-mvn-version))
    7882            (warn "M2 was set to '~A' in the process environment but '~A' doesn't exist."
    7983                  m2 mvn-path))))
     
    101105            (when mvn
    102106              (return-from find-mvn mvn)))))))
    103   (warn "Unable to locate Maven executable."))
     107  (warn "Unable to locate Maven executable to find Maven Aether adaptors."))
    104108
    105109(defun find-mvn-libs ()
     
    143147         (minor (second version))
    144148         (patch (third version)))
    145     (or
    146      (and (>= major 3)
    147           (>= minor 1))
    148      (and (>= major 3)
    149           (>= minor 0)
    150           (>= patch 3)))))
     149    (values
     150     (or
     151      (and (>= major 3)
     152           (>= minor 1))
     153      (and (>= major 3)
     154           (>= minor 0)
     155           (>= patch 3)))
     156     (list major minor patch))))
    151157
    152158(defparameter *init* nil)
  • trunk/abcl/contrib/abcl-asdf/packages.lisp

    r13903 r14504  
    55   #:resolve
    66
     7   #:ensure-mvn-version
     8
     9;;; Leaning towards deprecation
    710   #:resolve-dependencies
    811   #:resolve-artifact
     
    3942
    4043(defpackage #:abcl-asdf-test
    41   (:use :cl #+nil :abcl-test-lisp) ;;; FIXME include some sort of test framework
     44  (:use :cl :abcl-asdf)
    4245  (:export #:run))
  • trunk/abcl/contrib/abcl-asdf/tests/example.lisp

    r14364 r14504  
    1 (in-package :cl-user)
     1(in-package :abcl-asdf-test)
    22
    33(defun test-LOG4J.2 ()
     
    88  (#"info" (#"getRootLogger" 'log4j.Logger) "Kilroy wuz here."))
    99
     10(rt:deftest LOG4j.2
     11    (test-LOG4J.2)
     12  t)
    1013
    1114
     
    1417
    1518
     19
  • trunk/abcl/contrib/abcl-asdf/tests/maven.lisp

    r13808 r14504  
    1010(in-package :abcl-asdf-test)
    1111
    12 ;;;;(deftest LOG4J.1
    13 (defun test-LOG4J.1 ()
     12(rt:deftest LOG4J.1
    1413    (let ((result (abcl-asdf:resolve-dependencies "log4j" "log4j")))
    1514      (and result
    1615           (format *standard-output* "~&~A~%" result)
    17            (type-p result 'cons))))
    18 ;;;  t)
     16           (type-p result 'cons)))
     17  t)
    1918
    2019
    21 ;;;;(deftest ABCL.1
    22 (defun test-ABCL.1 ()
    23     (let ((result (abcl-asdf:resolve-dependencies "org.armedbear.lisp" "abcl")))
    24       (and result
    25            (format *standard-output* "~&~A~%" result)
    26            (type-p result 'cons))))
    27 ;;;  t)
     20(rt:deftest ABCL.1
     21  (let ((result (abcl-asdf:resolve-dependencies "org.armedbear.lisp" "abcl")))
     22    (and result
     23         (format *standard-output* "~&~A~%" result)
     24         (type-p result 'cons)))
     25  t)
    2826
    2927
  • trunk/abcl/contrib/abcl-asdf/tests/test.lisp

    r14197 r14504  
    22
    33(defun run (&rest args)
    4   (abcl-rt:do-test 'test-log4j.2))
     4  (abcl-rt:do-tests))
     5
     6(rt:deftest ABCL-ASDF.MAVEN.1
     7    (multiple-value-list (ensure-mvn-version))
     8  (t (3 0 4)))
    59
    610 
Note: See TracChangeset for help on using the changeset viewer.