Changeset 13431


Ignore:
Timestamp:
08/01/11 21:34:35 (10 years ago)
Author:
Mark Evenson
Message:

Allow ASDF definitions for JAR-FILE to include ".jar".

This increases compatibility with the original version of JSS.

The only possible situation where this doesn't make sense would be if
a jar where to end in something other than ".jar", like perhaps ".zip"
or ".war". In this case, additional ASDF classes should be defined
extending JAR-FILE.

Location:
trunk/abcl/contrib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd

    r13430 r13431  
    44(defsystem :abcl-asdf
    55  :author "Mark Evenson"
    6   :version "0.3.0"
     6  :version "0.3.1"
    77  :depends-on ("jss")
    88  :components
  • trunk/abcl/contrib/abcl-asdf/asdf-jar.lisp

    r13430 r13431  
    2323                         (all-jars-below directory)
    2424                         (directory (merge-pathnames "*.jar" directory)))
    25      :doing (if (not (member (namestring (truename jar)) *added-to-classpath* :test 'equal))
     25     :doing (if (not (member (namestring (truename jar))
     26                             *added-to-classpath* :test 'equal))
    2627                (return-from need-to-add-directory-jar? t)))
    2728  nil)
     
    5758      (java:add-to-classpath (component-pathname c))))
    5859
     60;;; The original JSS specified jar pathnames as having a NAME ending
     61;;; in ".jar" without a TYPE.  If we encounter such a definition, we
     62;;; clean it up.
     63(defmethod perform :before ((operation load-op) (c jar-file))
     64  (when (#"endsWith" (slot-value c 'name) ".jar")
     65    (with-slots (name absolute-pathname) c
     66      (let* ((new-name
     67              (subseq name 0 (- (length name) 4)))
     68             (new-absolute-pathname
     69              (make-pathname :defaults absolute-pathname :name new-name)))
     70        (setf name new-name
     71              absolute-pathname new-absolute-pathname)))))
     72
     73(defmethod operation-done-p :before ((operation load-op) (c jar-file))
     74  (when (#"endsWith" (slot-value c 'name) ".jar")
     75    (with-slots (name absolute-pathname) c
     76      (let* ((new-name
     77              (subseq name 0 (- (length name) 4)))
     78             (new-absolute-pathname
     79              (make-pathname :defaults absolute-pathname :name new-name)))
     80        (setf name new-name
     81              absolute-pathname new-absolute-pathname)))))
     82
    5983(defmethod operation-done-p ((operation load-op) (c jar-file))
    6084  (or abcl-asdf:*inhibit-add-to-classpath*
  • trunk/abcl/contrib/jss/jss.asd

    r13430 r13431  
    44(defsystem :jss
    55  :author "Alan Ruttenberg, Mark Evenson"
    6   :version "3.0.0"
     6  :version "3.0.1"
    77  :components
    88  ((:module base
Note: See TracChangeset for help on using the changeset viewer.