A recent commit:
62a21ec Fix ABCL-ASDF usage with maven-3.3.x
contained the following change:
- (when repository - (#"addRepository" collect-request - (if repository-p - (ensure-remote-repository :repository repository) - (ensure-remote-repository)))) + (#"addRepository" collect-request + (if repository-p + (ensure-remote-repository :repository repository) + (ensure-remote-repository)))
The upshot of this change is that it broke my code that uses :repository nil. This may be a non-standard thing, but I use it for jars in my local maven library. I propose the following:
--- i/contrib/abcl-asdf/maven-embedder.lisp +++ w/contrib/abcl-asdf/maven-embedder.lisp @@ -469,10 +469,13 @@ (defun resolve-dependencies (group-id artifact-id artifact (java:jfield (jss:find-java-class "JavaScopes") "COMPILE"))) (collect-request (java:jnew (jss:find-java-class "CollectRequest")))) (#"setRoot" collect-request dependency) - (#"addRepository" collect-request - (if repository-p - (ensure-remote-repository :repository repository) - (ensure-remote-repository))) + + ;; Don't call addRepository if we explicitly specify a NIL repository + (unless (and repository-p (not repository)) + (#"addRepository" collect-request + (if repository-p + (ensure-remote-repository :repository repository) + (ensure-remote-repository)))) (let* ((node (#"getRoot" (#"collectDependencies" (ensure-repository-system) (ensure-session) collect-request))) (dependency-request
which will call ensure-remote-repository only if :repository NIL is not explicitly specified. Any objections?
thanks,
Cyrus
On 01 Jul 2015, at 00:45, Cyrus Harmon ch-lisp@bobobeach.com wrote:
A recent commit:
62a21ec Fix ABCL-ASDF usage with maven-3.3.x
[…]
The upshot of this change is that it broke my code that uses :repository nil. This may be a non-standard thing, but I use it for jars in my local maven library. I propose the following:
A docstring or too from your side would be nice, as I have never tried to force the exclusive use of the file:~/.m2/ (I think this is what you are doing, right?)
which will call ensure-remote-repository only if :repository NIL is not explicitly specified. Any objections?
Your patch doesn’t seem to break my usage; applied in [r14791][].
From my empirical wrangling with maven-3.3.x, it had seemed necessary to always add the remote repository to the CollectRequest, but apparently it isn’t. Funny that the subsequent call to #”collectDependencies” doesn’t need the local repository forced in the same manner, but I’ll just chalk that up to “that crazy Maven!"
[r14791]: http://abcl.org/trac/changeset/14791
armedbear-devel@common-lisp.net