Hello, I'm trying to use lein-git-down
inside of my .lein/profiles.clj
profile
{:user {:plugins [[lein-pprint "1.1.1"]
[lein-ancient "0.6.15"]
[reifyhealth/lein-git-down "0.3.5"]
[lein-catapult "4fa2f909f334d2094b2885567f0f036da3518820"]]
:middleware [lein-git-down.plugin/inject-properties]
:repositories [["public-github" {:url "<git://github.com>" :protocol :ssh}]]
:git-down {lein-catapult {:coordinates holtzermann17/lein-catapult}} ;)
:dependencies [[slamhound "1.3.1"]]
:injections [clojure.repl :refer [apropos
demunge
dir
dir-fn
doc
find-doc
pst
root-cause
set-break-handler!
source
source-fn
stack-element-str
thread-stopper]]}}
This isn't working though, I get complaints that the jar file can't be found
$ lein catapult <http://USER>:PASS@127.0.0.1:8080/repl
:repositories detected in user-level profiles! [:user]
See <https://github.com/technomancy/leiningen/wiki/Repeatability>
Could not find artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 in central (<https://repo1.maven.org/maven2/>)
Could not find artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 in clojars (<https://repo.clojars.org/>)
Could not transfer artifact lein-catapult:lein-catapult:jar:4fa2f909f334d2094b2885567f0f036da3518820 from/to public-github (<git://github.com>): Cannot access <git://github.com> with type default using the available connector factories: BasicRepositoryConnectorFactory
Could not transfer artifact lein-catapult:lein-catapult:pom:4fa2f909f334d2094b2885567f0f036da3518820 from/to public-github (<git://github.com>): Cannot access <git://github.com> with type default using the available connector factories: BasicRepositoryConnectorFactory
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Same basic setup as in the .lein/profiles.clj
file seems to work fine inside of a project.clj
that I have been working on
Am I doing something wrong here?
@holtzermann17 Would need more details - it’d help to prefix your cmd with DEBUG=true
to potentially get more context of the step that is happening
but if it works in your project.clj - do you mean as a “top-level” key - ie. not in a :profiles
entry?
if so, that’s probably your difference
the .lein/profiles.clj
level is the user
profile - it’s a profile that is merged on later - perhaps merging this in at this point is too late
or perhaps the user
profile is not being included as a profile in the task you ar running
eg. maybe you need to have lein with-profile +user catapult ...
Hi @mikerod, I got the dependency to load with jitpack
so (short term) problem solved.
{:user {:plugins [[lein-pprint "1.1.1"]
[lein-ancient "0.6.15"]
[reifyhealth/lein-git-down "0.3.5"]
[com.github.holtzermann17/lein-catapult "4fa2f909f334d2094b2885567f0f036da3518820"]]
:repositories [["jitpack" "<https://jitpack.io>"]]
:dependencies [[slamhound "1.3.1"]]
:injections [clojure.repl :refer [apropos
demunge
dir
dir-fn
doc
find-doc
pst
root-cause
set-break-handler!
source
source-fn
stack-element-str
thread-stopper]]}}
(Viz., this works.)those injections look weird - lein expects code to run, not require clauses
(not the question you asked, but I would be surprised if that didn't end up erroring)
also you can get all of those (plus pprint and javadoc) with (apply require clojure.main/repl-requires)
I agree there too
And still confused on original question. Wanted more debug details. And think profile merging is to blame
lein.bat
on the official page still seem to point to version 2.9.1 instead of the new 2.9.2 .