You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
It is unclear from the README whether there is support for Maven/Java based dependencies or not.
I've create a test project that suggests it is not, however, I'd like it clarified whether this is to be expected or if I'm running into an issue.
I've create a new lein app via lein new git-down-test. Then I modified to project.clj to be as follows:
~/I/p/git-down-test $ lein repl
nREPL server started on port 50263 on host 127.0.0.1 - nrepl://127.0.0.1:50263
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.10.0
OpenJDK 64-Bit Server VM 11.0.2+9
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
git-down-test.core=> (import org.apache.commons.lang3.RandomUtils)
org.apache.commons.lang3.RandomUtils
git-down-test.core=> (RandomUtils/nextBoolean)
false
However, when I modify the project.clj to use [org.apache.commons/commons-lang3 "6b9964f"] instead then the following happens.
~/I/p/git-down-test $ lein deps
Retrieving apache/commons-lang/6b9964f/commons-lang-6b9964f.pom from public-github
Retrieving apache/commons-lang/6b9964f/commons-lang-6b9964f.jar from public-github
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by clojure.lang.Reflector (file:/usr/local/Cellar/leiningen/2.8.1/libexec/leiningen-2.8.1-standalone.jar) to method com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.getDocumentElement()
WARNING: Please consider reporting this to the maintainers of clojure.lang.Reflector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Created /Users/me/.gitlibs/libs/apache/commons-lang/6b9964ff4b89205d63eac3db005757edf19e9dda/target/commons-lang3-3.12.1-SNAPSHOT.jar
~/I/p/git-down-test $ lein repl
nREPL server started on port 49638 on host 127.0.0.1 - nrepl://127.0.0.1:49638
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.10.0
OpenJDK 64-Bit Server VM 11.0.2+9
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
git-down-test.core=> (import org.apache.commons.lang3.RandomUtils)
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:471).
org.apache.commons.lang3.RandomUtils
If this is not expected to work then I'm not requesting it, merely that it more clearly stated this is not the intention.
The text was updated successfully, but these errors were encountered:
Thanks for raising the issue. The intent of lein-git-down is primarily for Clojure projects. There is nothing necessarily stopping someone from using it to bring in Java/mvn projects, but that project would have to have a very simple pom (eg: just dependencies, src path, resource path) since the tool doesn't know how to build a full Maven project. Looks like commons/lang3 references a parent pom and uses some Maven build plugins. The resulting jar isn't built correctly and so the class can't be found on the classpath. Will make a note to add a comment in the README for a future release.
It is unclear from the README whether there is support for Maven/Java based dependencies or not.
I've create a test project that suggests it is not, however, I'd like it clarified whether this is to be expected or if I'm running into an issue.
I've create a new lein app via
lein new git-down-test
. Then I modified toproject.clj
to be as follows:I can then proves this works via the following
However, when I modify the
project.clj
to use[org.apache.commons/commons-lang3 "6b9964f"]
instead then the following happens.If this is not expected to work then I'm not requesting it, merely that it more clearly stated this is not the intention.
The text was updated successfully, but these errors were encountered: