Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ask sbt to only fetch dependencies, without compiling?

Tags:

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.

like image 783
WaeCo Avatar asked Jan 15 '16 09:01

WaeCo


People also ask

How do we specify library dependencies in sbt?

The libraryDependencies key Most of the time, you can simply list your dependencies in the setting libraryDependencies . It's also possible to write a Maven POM file or Ivy configuration file to externally configure your dependencies, and have sbt use those external configuration files.

Which is the correct way to add dependencies in sbt file?

If you have JAR files (unmanaged dependencies) that you want to use in your project, simply copy them to the lib folder in the root directory of your SBT project, and SBT will find them automatically.

Where are sbt dependencies stored?

All new SBT versions (after 0.7. x ) by default put the downloaded JARS into the . ivy2 directory in your home directory. If you are using Linux, this is usually /home/<username>/.

Does sbt use ivy?

By default, sbt uses the standard Ivy home directory location ${user.


1 Answers

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

like image 156
Seth Tisue Avatar answered Sep 17 '22 17:09

Seth Tisue