Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Cannot resolve plugins from Github repository #56

Open
Sardtok opened this issue Apr 4, 2023 · 0 comments
Open

Cannot resolve plugins from Github repository #56

Sardtok opened this issue Apr 4, 2023 · 0 comments

Comments

@Sardtok
Copy link

Sardtok commented Apr 4, 2023

When a plugin resides in a Github repo, it has to be downloaded and JARed by lein-git-down prior to being referenced in the list of plugins for it to work.

(defproject example "1.0.0"
  :description "Example Project"
  :url "https://example.com/example"
  :min-lein-version "2.0.0"
  :dependencies [[org.clojure/clojure "1.11.1"]
                 [Sardtok/drift "5586b939b1ab66c7dbf21a15b06815f238176079"]]

  :plugins [[reifyhealth/lein-git-down "0.4.1"]]

  :middleware [lein-git-down.plugin/inject-properties]

  :source-paths ["src"]

  :clean-targets ["target"]

  :profiles {:dev {:plugins [[Sardtok/drift "5586b939b1ab66c7dbf21a15b06815f238176079"]]
                   :main example.core}}

  :repositories [["github" {:url "git://github.com" :checksum :warn}]])

Fails with:

Could not find artifact Sardtok:drift:jar:5586b939b1ab66c7dbf21a15b06815f238176079 in central (https://repo1.maven.org/maven2/)
Could not find artifact Sardtok:drift:jar:5586b939b1ab66c7dbf21a15b06815f238176079 in clojars (https://repo.clojars.org/)
Could not transfer artifact Sardtok:drift:jar:5586b939b1ab66c7dbf21a15b06815f238176079 from/to github (git://github.com): Cannot access git://github.com with type default using the available connector factories: BasicRepositoryConnectorFactory
Failed to read artifact descriptor for Sardtok:drift:jar:5586b939b1ab66c7dbf21a15b06815f238176079
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.

If I remove the Sardtok/drift plugin from the dev profile, the artifact is downloaded. I can then add it back in, and it works as expected. If I ever update the plugin, I have to comment it out to update the deps, and then comment it back in.

This isn't a huge issue, but it would be nice to be able to get plugins from Git. In this case it's an updated version of Drift that works with Java 9+. Sure I could publish it to our private Nexus server, but we are trying to move away from using it.

Not sure if it's possible for lein-git-down to run before other plugins are resolved, or if there is a solution to this problem that isn't publishing the plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant