tools-deps 2023-07-21

How can I create a (non uber) jar release with a lib/ directory

Can you explain what you mean about the lib/ directory?

like the datomic sdk , all the dep jars in lib/

or like lein-libdir plug-in

You can't redistribute those so you can't (it shouldn't) try to bundle them with your library.

I assume you're asking about building a library from your own code that depends on those local libs?

‘lib’ is maybe a misnomer , im just trying to distribute my application and uberjar has some unfavorable characteristics

instead of messing with all the logic in trying to merge every dependency jar into a single fatjar

Uberjar is normally how you build an application - can you explain why it doesn't work for you?

i wanted just java -cp lib: app.jar

my specific use case is probably not great, im getting security scanned and the fatjar has vulnerable code that i can’t tell which dependency it’s coming from via Stree

So... Build the (Uber) jar without those deps?

but uberjar have always had problems as i recall

Huh? That is the standard way to build an app for deployment...

i remember running into issues i how it attempts to merge jars together, it was so long ago though, i wish i could be more specific

anyways i get your instincts

let me figure out a different path , thank you 🙏

I would say: try the standard approach and if you have a specific issue, ask about that specific issue...

👍 1

Fwiw I don’t think this request is weird, and I too wish “dir of libs” was more standard because of uberjar edge cases. Datomic does it after all!

👍 1

If you look in the channel at that date but outside that thread, you see some suggestions along these lines https://clojurians.slack.com/archives/C6QH853H8/p1640218580108200

👍 1

Essentially use create-basis then copy. Git deps require some extra care though

pack.alpha is designed to support this kind of workflow

🔥 1

another fantastic juxt library , ty @dominicm