Fork me on GitHub
#tools-build
<
2022-04-30
>
pmooser09:04:13

I have a question. I'm trying to build a jar, but I'm depending on a build of a library that is specified by a git sha, with an entry like this:

org.babashka/sci {:git/url "" :git/sha "fcf7e6067f091fd2cf2843660349e820c4449dd8"}
When I try to do that, I get a message that I've never seen before (when I depend on things using normal maven-style coordinates):
Skipping coordinate: {:git/url , :git/sha fcf7e6067f091fd2cf2843660349e820c4449dd8, :deps/manifest :deps, :deps/root /Users/me/.gitlibs/libs/org.babashka/sci/fcf7e6067f091fd2cf2843660349e820c4449dd8, :parents #{[]}, :paths [/Users/me/.gitlibs/libs/org.babashka/sci/fcf7e6067f091fd2cf2843660349e820c4449dd8/resources /Users/me/.gitlibs/libs/org.babashka/sci/fcf7e6067f091fd2cf2843660349e820c4449dd8/src]}
In the tools.build code, it looks like this happens due to there being no mvn/version in the original coordinate. Is there any way around this? I don't quite understand why it won't include it, since it's just another way to specify the artifact.

borkdude11:04:58

I'd be happy to make an interim mvn release but I'd like to know first if tools.build is able to build uberjars from git deps - it would surprise me if it didn't support that

Alex Miller (Clojure team)12:04:52

The skipping part is re making the pom inside the jar (because maven has no way to represent this)

Alex Miller (Clojure team)12:04:11

It should build the jar just fine but if you are publishing something it won't include the git dep as a dependency in the pom (as it can't)

Alex Miller (Clojure team)12:04:53

If this is an uberjar then I assume you're not publishing and you don't care