Hello, sharing this question here as well as it is sort of polylith related (or not?) https://clojurians.slack.com/archives/C03S1KBA2/p1778170830934019
You cannot depend on a Java source project like that (as noted in the #clojure thread).
But if it was ok with Leiningen how come we cannot reproduce the behaviour with deps? And what is the alternative?
How were you depending on a git source with Leiningen? It doesn't support that out of the box.
This is the project.clj dependency [com.github.amazon-archives/aws-request-signing-apache-interceptor "f39dfaf" :exclusions [com.amazonaws/aws-java-sdk-core]]
You must have some sort of plugin for Leiningen to treat that as a git dep?
These are all the plugins, I'm afraid I don't see anything relevant.
:plugins [[jonase/eastwood "0.3.5"]
[cider/cider-nrepl "0.50.2"]
[mx.cider/enrich-classpath "1.19.3"]
[lein-set-version "0.4.1"]
[lein-difftest "2.0.0"]]It's not a valid "Maven" dependency because that's not a released version -- so you must have some sort of plugin for Leiningen to handle git deps... What version of lein are you using?
Also check your user-level Leiningen config (which is added to the project-level config).
Leiningen 2.12.0
Is it that http://jitpack.io does what I'm looking for here? Looks like it....
No idea. Never used it. And I haven't used Leiningen really since 2015.
There must be something in your project.clj (or user-level config) that is handling a Java source dependency from GitHub and compiling it for you...
Yes, I'm convinced it is this http://jitpack.io service. I've now defined the dependency as a maven dependency with a version of "`f39dfaf`" and it looks like it worked.... Not great to discover how this is actually handled.
You just define jitpack as a repo and it works as a middleman compiling the source code for you... whatever that entails.
"Magic..." 🙂
Thank you very much @seancorfield you helped me spot the issue 🎯 !
So you just added jitpack to :mvn/repos in deps.edn and it worked? That's kinda cool (and a bit scary, considering you could use it to force build any project for any commit).
Yes exactly, added it to :mvn/repos in deps.edn
:mvn/repos {"jitpack.io" {:url ""}}
It was used the same way in the Leiningen project.clj
The important bit is how you define the dependency using the following url style as explained on jitpack's website:
'com.github.User:Repo:Tag'
Obviously, all the the build tools can see is that this is just another mvn repo 🤷 🙄