[armedbear-cvs] r14234 - trunk/abcl/contrib/jss
mevenson at common-lisp.net
mevenson at common-lisp.net
Fri Nov 9 14:44:59 UTC 2012
Author: mevenson
Date: Fri Nov 9 06:43:09 2012
New Revision: 14234
Log:
Fixes #263: ABCL-CONTRIB now loads with wildcards in CLASSPATH.
Modified:
trunk/abcl/contrib/jss/invoke.lisp
trunk/abcl/contrib/jss/jss.asd
Modified: trunk/abcl/contrib/jss/invoke.lisp
==============================================================================
--- trunk/abcl/contrib/jss/invoke.lisp Fri Nov 9 06:42:42 2012 (r14233)
+++ trunk/abcl/contrib/jss/invoke.lisp Fri Nov 9 06:43:09 2012 (r14234)
@@ -377,22 +377,34 @@
(format stream "method ~a" (#"toString" obj))))
(defun do-auto-imports ()
- (flet ((import-class-path (cp)
- (map nil
- (lambda(s)
- (setq s (jcall "toString" s))
+ (labels ((expand-paths (cp)
+ (loop :for s :in cp
+ :appending (loop :for entry
+ :in (let ((p (pathname s)))
+ (if (wild-pathname-p p)
+ (directory p)
+ (list p)))
+ :collecting entry)))
+ (import-classpath (cp)
+ (mapcar
+ (lambda (p)
(when *load-verbose*
- (format t ";Importing ~a~%" s))
+ (format t ";; Importing ~A~%" p))
(cond
- ((file-directory-p s) )
- ((equal (pathname-type s) "jar")
- (jar-import (merge-pathnames (jcall "toString" s)
+ ((file-directory-p p) )
+ ((equal (pathname-type p) "jar")
+ (jar-import (merge-pathnames p
(format nil "~a/" (jstatic "getProperty" "java.lang.System" "user.dir")))))))
- (jcall "split" cp
- (string (jfield (jclass "java.io.File") "pathSeparatorChar"))))))
- (import-class-path (jcall "getClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))
- (import-class-path (jcall "getBootClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))
- ))
+ cp))
+ (split-classpath (cp)
+ (coerce
+ (jcall "split" cp
+ (string (jfield (jclass "java.io.File") "pathSeparatorChar")))
+ 'cons))
+ (do-imports (cp)
+ (import-classpath (expand-paths (split-classpath cp)))))
+ (do-imports (jcall "getClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))
+ (do-imports (jcall "getBootClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))))
(eval-when (:load-toplevel :execute)
(when *do-auto-imports*
Modified: trunk/abcl/contrib/jss/jss.asd
==============================================================================
--- trunk/abcl/contrib/jss/jss.asd Fri Nov 9 06:42:42 2012 (r14233)
+++ trunk/abcl/contrib/jss/jss.asd Fri Nov 9 06:43:09 2012 (r14234)
@@ -1,7 +1,7 @@
;;;; -*- Mode: LISP -*-
(asdf:defsystem :jss
:author "Alan Ruttenberg, Mark Evenson"
- :version "3.0.3"
+ :version "3.0.4"
:components
((:module base
:pathname "" :serial t
More information about the armedbear-cvs
mailing list