Changeset 14373


Ignore:
Timestamp:
02/13/13 19:29:31 (11 years ago)
Author:
Mark Evenson
Message:

Backport r14364 | mevenson | 2013-01-31 11:02:29 +0100 (Thu, 31 Jan 2013) | 9 lines

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.

Location:
branches/1.1.x/contrib/abcl-asdf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1.x/contrib/abcl-asdf/abcl-asdf.lisp

    r14237 r14373  
    132132          (unless (java:jinstance-of-p (java:java-exception-cause e)
    133133                                  "java.lang.ClassNotFoundException")
    134             (error "Unexpected Java exception~&~A.~&" e))
    135           (if (find-mvn)
    136               (resolve-dependencies group-id artifact-id version)
    137               (if alternate-uri
    138                   (values (namestring alternate-uri) alternate-uri)
    139                   (t
    140                    (error "Failed to resolve MVN component name ~A." name)))))))))
     134            (error "Unexpected Java exception~&~A.~&" e))))
     135      (if (find-mvn)
     136          (resolve-dependencies group-id artifact-id version)
     137          (if alternate-uri
     138              (values (namestring alternate-uri) alternate-uri)
     139              (t
     140               (error "Failed to resolve MVN component name ~A." name)))))))
    141141 
    142142(defun as-classpath (classpath)
  • branches/1.1.x/contrib/abcl-asdf/maven-embedder.lisp

    r14259 r14373  
    5151  "Attempt to find a suitable Maven ('mvn') executable on the hosting operating system.
    5252
    53 Returns the path of the Maven executable or nil if none are found."
     53Returns the path of the Maven executable or nil if none are found.
     54
     55Emits warnings if not able to find a suitable executable."
    5456
    5557  (let ((m2-home (ext:getenv "M2_HOME"))
     
    98100                             mvn-path e)))))
    99101            (when mvn
    100               (return-from find-mvn mvn))))))))
     102              (return-from find-mvn mvn)))))))
     103  (warn "Unable to locate Maven executable."))
    101104
    102105(defun find-mvn-libs ()
  • branches/1.1.x/contrib/abcl-asdf/tests/example.lisp

    r13808 r14373  
    1 (in-package :abcl-asdf-test)
     1(in-package :cl-user)
    22
    3 ;;;(deftest LOG4J.2
    4 ;;;    (progn
    53(defun test-LOG4J.2 ()
    6   (asdf:load-system "log4j")
    7   (let ((logger (#"getLogger" 'log4j.Logger (symbol-name (gensym)))))
    8     (#"trace" logger "Kilroy wuz here.")))
    9 ;;;  t)
     4  "Output a message to the Console.
     5
     6Note:  for users of SLIME, this will appear in the associated *inferior-lisp* buffer."
     7  (#"configure" 'log4j.BasicConfigurator)
     8  (#"info" (#"getRootLogger" 'log4j.Logger) "Kilroy wuz here."))
    109
    1110
    1211
    1312
     13
     14
     15
  • branches/1.1.x/contrib/abcl-asdf/tests/log4j.asd

    r13867 r14373  
    11;;;; -*- Mode: LISP -*-
    2 (in-package :asdf)
    32
    4 (defsystem :log4j
    5   :components
    6   ((:module log4j.jar :components
     3(asdf:defsystem :log4j 
     4  :defsystem-depends-on (abcl-asdf)
     5  :components ((:module log4j.jar :components
    76            ((:mvn "log4j/log4j/1.2.15")))
    87   (:module source :pathname "" :components
     
    109            :depends-on (log4j.jar))))
    1110
    12  
     11(defmethod perform ((o asdf:test-op) (s (eql (asdf:find-system :log4j))))
     12  (asdf:load-system :log4j)
     13  (eval (read-from-string "(cl-user::test-log4j.2)")))
Note: See TracChangeset for help on using the changeset viewer.