[armedbear-cvs] r13804 - in trunk/abcl/contrib/abcl-asdf: . tests

mevenson at common-lisp.net mevenson at common-lisp.net
Wed Jan 25 11:32:09 UTC 2012


Author: mevenson
Date: Wed Jan 25 03:32:09 2012
New Revision: 13804

Log:
Fix for maven-3.0.4.

Part of the process of cleaning up ABCL-ASDF to work with more Maven
versions.

Seems to be failing for OS X Maven 3.0.4, so need to do a round of testing.

Add system definition of ABCL-ASDF-TEST which becomes the behavior for
invoking ASDF:TEST-SYSTEM on ABCL-ASDF.  Really update to version
"0.5.0".

Correct misspellings.

TODO:  figure out a list of repos to iteratively search.

TODO:  overload the system defintion version mechanism to allow
non-integer values, or just use the IRI class?

TODO:  be more verbose on searching/downloading Maven artifacts as it
can be quite slow for large amounts of artifacts.

Modified:
   trunk/abcl/contrib/abcl-asdf/README.markdown
   trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd
   trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
   trunk/abcl/contrib/abcl-asdf/packages.lisp
   trunk/abcl/contrib/abcl-asdf/tests/example.lisp
   trunk/abcl/contrib/abcl-asdf/tests/maven.lisp

Modified: trunk/abcl/contrib/abcl-asdf/README.markdown
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/README.markdown	Wed Jan 25 03:31:59 2012	(r13803)
+++ trunk/abcl/contrib/abcl-asdf/README.markdown	Wed Jan 25 03:32:09 2012	(r13804)
@@ -133,10 +133,10 @@
        as this process can potentially take a long time.
 
 
-#### Colophone
+#### Colophon
 
     Mark <evenson.not.org at gmail.com>
     
     Created: 2011-01-01
-    Revised: 2012-01-22
+    Revised: 2012-01-24
     

Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd	Wed Jan 25 03:31:59 2012	(r13803)
+++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd	Wed Jan 25 03:32:09 2012	(r13804)
@@ -3,7 +3,7 @@
 
 (defsystem :abcl-asdf
   :author "Mark Evenson"
-  :version "0.4.1"
+  :version "0.5.0"
   :depends-on (jss)
   :components 
   ((:module packages :pathname "" 
@@ -17,3 +17,24 @@
              (:file "maven-embedder" 
                     :depends-on ("abcl-asdf" "asdf-jar")))
             :depends-on (packages))))
+
+
+(eval-when (:compile-toplevel :load-toplevel)
+  (load "~/quicklisp/setup")
+  (apply (intern (symbol-name 'quickload) 'quicklisp) "rt"))
+
+(defsystem :abcl-asdf-test
+  :author "Mark Evenson"
+  :depends-on (abcl-asdf quicklisp rt)
+  :components
+  ((:module tests :components
+            (#+nil (:file "example")
+                   (:file "maven")))))
+
+
+(defmethod perform ((o test-op) (c (eql (find-system 'abcl-asdf))))
+   "Invoke tests with (asdf:test-system 'abcl-asdf)."
+   (asdf:load-system 'abcl-asdf-test)
+
+   (funcall (intern (symbol-name 'run) 'abcl-asdf-test)))
+

Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp	Wed Jan 25 03:31:59 2012	(r13803)
+++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp	Wed Jan 25 03:32:09 2012	(r13804)
@@ -84,6 +84,10 @@
   (add-directory-jars-to-class-path *mvn-libs-directory* nil)
   (setf *init* t))
 
+(defparameter *http-wagon-implementations*
+  `("org.apache.maven.wagon.providers.http.HttpWagon" ;; introduced as default with maven-3.0.3
+    "org.apache.maven.wagon.providers.http.LightweightHttpWagon"))
+
 (defun make-wagon-provider ()
   (unless *init* (init))
   (java:jinterface-implementation 
@@ -91,7 +95,7 @@
    "lookup"
    (lambda (role-hint)
      (if (string-equal "http" role-hint)
-       (java:jnew "org.apache.maven.wagon.providers.http.LightweightHttpWagon")
+         (some (lambda (provider) (java:jnew provider)) *http-wagon-implementations*)
        java:+null+))
    "release"
    (lambda (wagon)

Modified: trunk/abcl/contrib/abcl-asdf/packages.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/packages.lisp	Wed Jan 25 03:31:59 2012	(r13803)
+++ trunk/abcl/contrib/abcl-asdf/packages.lisp	Wed Jan 25 03:32:09 2012	(r13804)
@@ -16,3 +16,6 @@
    #:*added-to-classpath*
    #:*inhibit-add-to-classpath*))
 
+(defpackage #:abcl-asdf-test
+  (:use :cl :rt)
+  (:export #:run))
\ No newline at end of file

Modified: trunk/abcl/contrib/abcl-asdf/tests/example.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/tests/example.lisp	Wed Jan 25 03:31:59 2012	(r13803)
+++ trunk/abcl/contrib/abcl-asdf/tests/example.lisp	Wed Jan 25 03:32:09 2012	(r13804)
@@ -1,9 +1,10 @@
 (in-package :abcl-asdf-test)
 
 (deftest LOG4J.2
-    (asdf:load-system "log4j")
-    (let ((logger (#"getLogger" 'log4j.Logger (symbol-name (gensym)))))
-      (#"trace" logger "Kilroy wuz here."))
+    (progn
+      (asdf:load-system "log4j")
+      (let ((logger (#"getLogger" 'log4j.Logger (symbol-name (gensym)))))
+        (#"trace" logger "Kilroy wuz here.")))
   t)
 
 

Modified: trunk/abcl/contrib/abcl-asdf/tests/maven.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/tests/maven.lisp	Wed Jan 25 03:31:59 2012	(r13803)
+++ trunk/abcl/contrib/abcl-asdf/tests/maven.lisp	Wed Jan 25 03:32:09 2012	(r13804)
@@ -5,4 +5,24 @@
 
 |#
 
-; TODO figure out what sort of test framework we can hook in.  Probably ABCL-RT
\ No newline at end of file
+; TODO figure out what sort of test framework we can hook in.  Probably ABCL-RT
+
+(in-package :abcl-asdf-test)
+
+(deftest LOG4J.1
+    (let ((result (abcl-asdf:resolve-dependencies "log4j" "log4j")))
+      (and result
+           (format *standard-output* "~&~A~%" result)
+           (type-p result 'cons)))
+  t)
+
+
+(deftest ABCL.1
+    (let ((result (abcl-asdf:resolve-dependencies "org.armedbear.lisp" "abcl")))
+      (and result
+           (format *standard-output* "~&~A~%" result)
+           (type-p result 'cons)))
+  t)
+
+
+




More information about the armedbear-cvs mailing list