Changeset 14365
- Timestamp:
- 01/31/13 14:26:25 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp
r14364 r14365 18 18 (classname :initarg :classname :initform nil) 19 19 (alternate-uri :initarg :alternate-uri :initform nil) 20 ;; inherited from ASDF:COMPONENT ??? what are the CL semantics on overriding -- ME 2012-04-0121 #+nil (version :initform nil)))20 ;; inherited from ASDF:COMPONENT ??? what are the CL semantics on overriding -- ME 2012-04-01 21 #+nil (version :initform nil))) 22 22 23 23 #+nil … … 30 30 (abcl-asdf:resolve 31 31 (ensure-parsed-mvn c))) 32 32 33 33 (defmethod perform ((operation load-op) (c mvn)) 34 34 (let ((resolved-path … … 59 59 (defun ensure-parsed-mvn (component) 60 60 (with-slots (name group-id artifact-id 61 version schema path repository)61 version schema path repository) 62 62 component 63 63 (when (null asdf::artifact-id) … … 98 98 99 99 (defgeneric resolve (something) 100 (:documentation "Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string."))100 (:documentation "Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string.")) 101 101 102 102 (defmethod resolve ((mvn-component asdf::mvn)) … … 107 107 denotes that current JVM already has already loaded a given class. Can possibly be a 108 108 single entry denoting a remote binary artifact." 109 (macrolet ((aif (something consequence alternative)) 110 `(let ((it ,(something))) 111 (if it 112 consequence 113 alternative))) 114 (let ((name (slot-value mvn-component 'asdf::name)) 115 (group-id (slot-value mvn-component 'asdf::group-id)) 116 (artifact-id (slot-value mvn-component 'asdf::artifact-id)) 117 (classname (slot-value mvn-component 'asdf::classname)) 118 (alternate-uri (slot-value mvn-component 'asdf::alternate-uri)) 119 (version (let ((it (slot-value mvn-component 'asdf::version))) 120 (cond 121 ((not it) 122 it) 123 (t 124 "LATEST"))))) 125 (handler-case 126 (when (and classname 127 (jss:find-java-class classname)) 128 (warn "Not loading ~A from the network because ~A is present in classpath." 129 name classname) 130 (return-from resolve t)) 131 (java:java-exception (e) 132 (unless (java:jinstance-of-p (java:java-exception-cause e) 133 "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))))))) 141 109 (let ((name (slot-value mvn-component 'asdf::name)) 110 (group-id (slot-value mvn-component 'asdf::group-id)) 111 (artifact-id (slot-value mvn-component 'asdf::artifact-id)) 112 (classname (slot-value mvn-component 'asdf::classname)) 113 (alternate-uri (slot-value mvn-component 'asdf::alternate-uri)) 114 (version (if (slot-value mvn-component 'asdf::version) 115 (slot-value mvn-component 'asdf::version) 116 "LATEST"))) 117 (handler-case 118 (when (and classname 119 (jss:find-java-class classname)) 120 (warn "Not loading ~A from the network because ~A is present in classpath." 121 name classname) 122 (return-from resolve t)) 123 (java:java-exception (e) 124 (unless (java:jinstance-of-p (java:java-exception-cause e) 125 "java.lang.ClassNotFoundException") 126 (error "Unexpected Java exception~&~A.~&" e)))) 127 (if (find-mvn) 128 (resolve-dependencies group-id artifact-id version) 129 (if alternate-uri 130 (values (namestring alternate-uri) alternate-uri) 131 (t 132 (error "Failed to resolve MVN component name ~A." name)))))) 133 142 134 (defun as-classpath (classpath) 143 135 "Break apart the JVM CLASSPATH string into a list of its consituents."
Note: See TracChangeset
for help on using the changeset viewer.