27

Is there a way to only download the dependencies but do not compile source.

I am asking because I am trying to build a Docker build environment for my bigger project. The Idear is that during docker build I clone the project, download all dependencies and then delete the code. Then use docker run -v to mount the frequently changing code into the docker container and start compiling the project.

Currently I just compile the code during build and then compile it again on run. The problem ist that when a dependencie changes I have to build from scratch and that takes a long time.

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
WaeCo
  • 1,155
  • 1
  • 10
  • 21

1 Answers1

42

Run sbt's update command. Dependencies will be resolved and retrieved.

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
  • This answer is correct for this question and should me marked so. However, it does not download plugins. – Abhishek Oct 02 '18 at 11:23
  • 1
    @Abhishek not sure what you mean. `update` can't run until the build definition has loaded, which can't happen unless plugins have been downloaded. – Seth Tisue Oct 02 '18 at 16:31