Fork me on GitHub

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.


@mitchell_clojure Not really a depstar question -- you can use the -P option on the clojure CLI to "prepare" dependencies.


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.


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!