Changeset 14656


Ignore:
Timestamp:
03/21/14 10:26:03 (3 years ago)
Author:
mevenson
Message:

Find the versioned system and contrib jars when building with Maven

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/abcl-contrib.lisp

    r14655 r14656  
    2828                      (concatenate 'string name "(-[0-9]\\.[0-9]\\.[0-9]\\.[0-9]([+~-]+)?)?")
    2929                      (pathname-name p)))
    30        (make-pathname :defaults p :name name)))
     30       p))
    3131
    3232(defun find-system ()
     
    4747     #p"http://abcl.org/releases/current/abcl.jar")))
    4848
     49(defun find-jar (predicate)
     50  (dolist (loader (java:dump-classpath))
     51    (let ((jar (some predicate loader)))
     52      (when jar
     53        (return jar)))))
     54
    4955(defun find-system-jar ()
    50   "Return the pathname of the system jar, one of `abcl.jar` or `abcl-m.n.p.jar` or `abcl-m.n.p[.~-]something.jar`."
    51   (dolist (loader (java:dump-classpath))
    52     (let ((abcl-jar (some #'system-jar-p loader)))
    53       (when abcl-jar
    54         (return abcl-jar)))))
     56  "Return the pathname of the system jar, one of `abcl.jar` or
     57`abcl-m.n.p.jar` or `abcl-m.n.p[.~-]something.jar`."
     58  (find-jar #'system-jar-p))
     59
     60(defun find-contrib-jar ()
     61  "Return the pathname of the contrib jar, one of `abcl-contrib.jar` or
     62`abcl-contrib-m.n.p.jar` or `abcl-contrib-m.n.p[.~-]something.jar`."
     63  (find-jar #'contrib-jar-p))
    5564
    5665(defvar *abcl-contrib* nil
     
    8897  "Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
    8998  (or (ignore-errors
    90         (when (find-system-jar)
    91           (probe-file
    92            (make-pathname :defaults (find-system-jar)
    93                           :name "abcl-contrib"))))
     99        (find-contrib-jar))
    94100      (some
    95101       (lambda (u)
Note: See TracChangeset for help on using the changeset viewer.