Scott Klarenbach <doyouunderst...@gmail.com> writes: > I'd like to exclude certain dependencies from my uberjar, by using the > :provided profile, but the jars are always included.
I believe the problem you’re seeing is due to the fact that Leiningen doesn’t quite think about dependency `scope` the same way Maven does. Adding a direct-only dependency to the `:provided` profile does mark it as `provided` `scope` in any resulting `pom.xml` and does not include the dependencies added to an uberjar. But if one of your normal dependencies *also* depends on the one you’ve added to `:provided`, then the “provided-ness” isn’t propogated and it will get pulled into the uberjar, just like any other indirect dependency. The work-around is first to add the provided dependency to the `:provided` profile as you’ve already done, then also add an `:exclusion` for that same artifact, either at the top-level or on the offending other direct dependencies. HTH, -- Marshall Bockrath-Vandegrift <llas...@damballa.com> Principal Software Engineer, Damballa R&D -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.