[armedbear-cvs] r14364 - in trunk/abcl/contrib/abcl-asdf: . tests
mevenson at common-lisp.net
mevenson at common-lisp.net
Thu Jan 31 10:02:35 UTC 2013
Author: mevenson
Date: Thu Jan 31 02:02:29 2013
New Revision: 14364
Log:
ASDF systems using the MVN component now load again.
log4j.asd example corrected as well.
FIND-MVN now emits a warning if it cannot actually find a Maven exectuable.
Thanks to Milos Negovanovic for identifying the problem with a patch.
Fixes #299.
Modified:
trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
trunk/abcl/contrib/abcl-asdf/tests/example.lisp
trunk/abcl/contrib/abcl-asdf/tests/log4j.asd
Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Tue Jan 29 00:36:14 2013 (r14363)
+++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Thu Jan 31 02:02:29 2013 (r14364)
@@ -131,13 +131,13 @@
(java:java-exception (e)
(unless (java:jinstance-of-p (java:java-exception-cause e)
"java.lang.ClassNotFoundException")
- (error "Unexpected Java exception~&~A.~&" e))
- (if (find-mvn)
- (resolve-dependencies group-id artifact-id version)
- (if alternate-uri
- (values (namestring alternate-uri) alternate-uri)
- (t
- (error "Failed to resolve MVN component name ~A." name)))))))))
+ (error "Unexpected Java exception~&~A.~&" e))))
+ (if (find-mvn)
+ (resolve-dependencies group-id artifact-id version)
+ (if alternate-uri
+ (values (namestring alternate-uri) alternate-uri)
+ (t
+ (error "Failed to resolve MVN component name ~A." name)))))))
(defun as-classpath (classpath)
"Break apart the JVM CLASSPATH string into a list of its consituents."
Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Tue Jan 29 00:36:14 2013 (r14363)
+++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Thu Jan 31 02:02:29 2013 (r14364)
@@ -50,7 +50,9 @@
(defun find-mvn ()
"Attempt to find a suitable Maven ('mvn') executable on the hosting operating system.
-Returns the path of the Maven executable or nil if none are found."
+Returns the path of the Maven executable or nil if none are found.
+
+Emits warnings if not able to find a suitable executable."
(let ((m2-home (ext:getenv "M2_HOME"))
(m2 (ext:getenv "M2"))
@@ -97,7 +99,8 @@
"~&Failed to find Maven executable '~A' in PATH because~&~A"
mvn-path e)))))
(when mvn
- (return-from find-mvn mvn))))))))
+ (return-from find-mvn mvn)))))))
+ (warn "Unable to locate Maven executable."))
(defun find-mvn-libs ()
(let ((mvn (find-mvn)))
Modified: trunk/abcl/contrib/abcl-asdf/tests/example.lisp
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/tests/example.lisp Tue Jan 29 00:36:14 2013 (r14363)
+++ trunk/abcl/contrib/abcl-asdf/tests/example.lisp Thu Jan 31 02:02:29 2013 (r14364)
@@ -1,12 +1,14 @@
-(in-package :abcl-asdf-test)
+(in-package :cl-user)
-;;;(deftest LOG4J.2
-;;; (progn
(defun test-LOG4J.2 ()
- (asdf:load-system "log4j")
- (let ((logger (#"getLogger" 'log4j.Logger (symbol-name (gensym)))))
- (#"trace" logger "Kilroy wuz here.")))
-;;; t)
+ "Output a message to the Console.
+
+Note: for users of SLIME, this will appear in the associated *inferior-lisp* buffer."
+ (#"configure" 'log4j.BasicConfigurator)
+ (#"info" (#"getRootLogger" 'log4j.Logger) "Kilroy wuz here."))
+
+
+
Modified: trunk/abcl/contrib/abcl-asdf/tests/log4j.asd
==============================================================================
--- trunk/abcl/contrib/abcl-asdf/tests/log4j.asd Tue Jan 29 00:36:14 2013 (r14363)
+++ trunk/abcl/contrib/abcl-asdf/tests/log4j.asd Thu Jan 31 02:02:29 2013 (r14364)
@@ -1,12 +1,13 @@
;;;; -*- Mode: LISP -*-
-(in-package :asdf)
-(defsystem :log4j
- :components
- ((:module log4j.jar :components
+(asdf:defsystem :log4j
+ :defsystem-depends-on (abcl-asdf)
+ :components ((:module log4j.jar :components
((:mvn "log4j/log4j/1.2.15")))
(:module source :pathname "" :components
((:file "example"))
:depends-on (log4j.jar))))
-
+(defmethod perform ((o asdf:test-op) (s (eql (asdf:find-system :log4j))))
+ (asdf:load-system :log4j)
+ (eval (read-from-string "(cl-user::test-log4j.2)")))
More information about the armedbear-cvs
mailing list