abcl-asdf: enhancements

 * mvn class now has :repository initarg

 * only add the repository to *mvn-repositories* if non-null

 * use the components repsoitory slot in resolve

 * fix resolve-dependencies call to use keyword args for version and repsoitory
parent 7ddb15d8
......@@ -14,7 +14,7 @@
(defclass mvn (iri)
((group-id :initarg :group-id :initform nil)
(artifact-id :initarg :artifact-id :initform nil)
(repository :initform "") ;;; XXX unimplemented
(repository :initarg :repository :initform "") ;;; XXX unimplemented
(resolved-classpath :initform nil :accessor resolved-classpath)
(classname :initarg :classname :initform nil)
(alternate-uri :initarg :alternate-uri :initform nil)
......@@ -82,7 +82,8 @@
(error "Failed to construct a mvn reference from name '~A' and version '~A'"
name version)))
(setf schema "mvn")
(pushnew repository *mvn-repositories*)
(when repository
(pushnew repository *mvn-repositories*))
;;; Always set path to normalized path "on the way out" to
;;; contain group-id/artifact-id/version
;;; TODO? record repository as well in path of component
......@@ -117,6 +118,7 @@ single entry denoting a remote binary artifact."
(artifact-id (slot-value mvn-component 'asdf::artifact-id))
(classname (slot-value mvn-component 'asdf::classname))
(alternate-uri (slot-value mvn-component 'asdf::alternate-uri))
(repository (slot-value mvn-component 'asdf::repository))
(version (if (slot-value mvn-component 'asdf::version)
(slot-value mvn-component 'asdf::version)
......@@ -131,7 +133,9 @@ single entry denoting a remote binary artifact."
(error "Unexpected Java exception~&~A.~&" e))))
(if (find-mvn)
(resolve-dependencies group-id artifact-id version)
(resolve-dependencies group-id artifact-id
:version version
:repository repository)
(if alternate-uri
(values (namestring alternate-uri) alternate-uri)
(error "Failed to resolve MVN component name ~A." name)))))
......@@ -443,10 +443,11 @@ in Java CLASSPATH representation."
artifact (java:jfield (jss:find-java-class "JavaScopes") "RUNTIME")))
(collect-request (java:jnew (jss:find-java-class "CollectRequest"))))
(#"setRoot" collect-request dependency)
(#"addRepository" collect-request
(if repository-p
(ensure-remote-repository :repository repository)
(when repository
(#"addRepository" collect-request
(if repository-p
(ensure-remote-repository :repository repository)
(let* ((node
(#"getRoot" (#"collectDependencies" (ensure-repository-system) (ensure-session) collect-request)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment