[Armedbear-cvs] r14667 - branches/1.3.1/src/org/armedbear/lisp

mevenson at common-lisp.net mevenson at common-lisp.net
Thu Apr 17 10:34:36 UTC 2014


Author: mevenson
Date: Thu Apr 17 10:34:35 2014
New Revision: 14667

Log:
Backport r14656:  Find the versioned system and contrib jars when building with Maven

Modified:
   branches/1.3.1/src/org/armedbear/lisp/abcl-contrib.lisp

Modified: branches/1.3.1/src/org/armedbear/lisp/abcl-contrib.lisp
==============================================================================
--- branches/1.3.1/src/org/armedbear/lisp/abcl-contrib.lisp	Thu Apr 17 10:33:49 2014	(r14666)
+++ branches/1.3.1/src/org/armedbear/lisp/abcl-contrib.lisp	Thu Apr 17 10:34:35 2014	(r14667)
@@ -27,7 +27,7 @@
                       "java.util.regex.Pattern"
                       (concatenate 'string name "(-[0-9]\\.[0-9]\\.[0-9]\\.[0-9]([+~-]+)?)?")
                       (pathname-name p)))
-       (make-pathname :defaults p :name name)))
+       p))
 
 (defun find-system ()
   "Find the location of the system.
@@ -46,12 +46,21 @@
    (ignore-errors
      #p"http://abcl.org/releases/current/abcl.jar")))
 
-(defun find-system-jar ()
-  "Return the pathname of the system jar, one of `abcl.jar` or `abcl-m.n.p.jar` or `abcl-m.n.p[.~-]something.jar`."
+(defun find-jar (predicate)
   (dolist (loader (java:dump-classpath))
-    (let ((abcl-jar (some #'system-jar-p loader)))
-      (when abcl-jar
-        (return abcl-jar)))))
+    (let ((jar (some predicate loader)))
+      (when jar
+        (return jar)))))
+
+(defun find-system-jar ()
+  "Return the pathname of the system jar, one of `abcl.jar` or
+`abcl-m.n.p.jar` or `abcl-m.n.p[.~-]something.jar`."
+  (find-jar #'system-jar-p))
+
+(defun find-contrib-jar ()
+  "Return the pathname of the contrib jar, one of `abcl-contrib.jar` or
+`abcl-contrib-m.n.p.jar` or `abcl-contrib-m.n.p[.~-]something.jar`."
+  (find-jar #'contrib-jar-p))
 
 (defvar *abcl-contrib* nil
   "Pathname of the ABCL contrib.
@@ -87,10 +96,7 @@
 (defun find-contrib ()
   "Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
   (or (ignore-errors
-        (when (find-system-jar)
-          (probe-file
-           (make-pathname :defaults (find-system-jar)
-                          :name "abcl-contrib"))))
+        (find-contrib-jar))
       (some
        (lambda (u)
          (probe-file (make-pathname




More information about the armedbear-cvs mailing list