dear all - hope everybody is good - I have a question here...
when I build a library jar that pulls another lib by :git/sha I can't seem to see that lib written in the META-INF/maven/...pom.xml is that supported?
it cannot be
poms can’t reference git coordinates
hmm, right, didn't think about that
so is the only way to publish the library and use the standard :mvn/version
a jar must declare its dependencies in a way that the jar ecosystem can locate and download them. git resolution is a trick that clojure has but not jars in general
i’m being a bit cagey because you can “publish” your library by just pushing to github
yeah so I meant publish to artifactory/maven
I guess that's what I am going to have to do
Depending on some specifics of of that dependency (most notably, its license), a possible alternative is to vendor it into your library. Just make sure the packages and any possible global identifiers are changed so that there are no conflicts of anyone else depend on both your library and that other library.
I guess I could also add the dep as top level in the parent parent project
For example, re-frame-10x uses https://github.com/benedekfazekas/mranderson. Because it needs a specific version of Reagent and other things, and it can't just include them as regular dependencies to avoid any conflicts with the main app.
you can vendor it, but you also risk having duplicates on the classpath in this way unless you do some shadowing
(ah, right. as mentioned. sorry for duplicate)
:D A duplicate about avoiding duplicates.
really reinforces the issue 🙂
thanks both I think that's gives me my answer 🙂
i’d probably write a script to manually vendor something. I think there’s some prior art in clojure itself in how it gets the asm library. If your library isn’t complicated it might be easier to copy it into a separate classpath root and update namespaces names so it has a new part and use that
I think the easiest here for me is to publish 😉
ah. yes if you control the lib lol
apparently deploying internally here will require some time - @p-himik do you know if there exists a mranderson for deps.edn or something similar to that?
No clue, sorry.
how many namespaces and deps are in the git/sha thing?
not many yeah