Fork me on GitHub
#depstar
<
2021-02-09
>
eval-on-point03:02:49

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.

seancorfield05:02:27

@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

seancorfield05:02:38

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.

eval-on-point12:02:21

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!