depstar

Discussion around https://github.com/seancorfield/depstar
Mitch 2021-02-09T03:21:49.077100Z

Sorry if I am missing something obvious, but is there a way to pre-download all the dependencies for my jar? Trying to take advantage of Docker layers by pulling the deps in one layer and then building in another, but I can't quite seem to figure out the right way to go about it. I haven't been able to take advantage of the :classpath arg, which seemed like the best lead.

seancorfield 2021-02-09T05:24:27.077900Z

@mitchell_clojure Not really a depstar question -- you can use the -P option on the clojure CLI to "prepare" dependencies. https://clojure.org/reference/deps_and_cli#_prepare_for_execution

seancorfield 2021-02-09T05:25:38.079Z

So you'd do clojure -P -M:whatever:aliases:you:need and that will resolve and download all the dependencies but not actually run any :main-opts.

Mitch 2021-02-09T12:45:21.081100Z

Thanks Sean! That was enough to point me in the right direction. The issue ended up being that :replace-deps was preventing my project dependencies from being downloaded when I ran clojure -P -X:uberjar. The solution being that I now have two separate commands: One which downloads the builder deps and one which downloads the app deps. Thank you!