有没有办法只下载依赖而不编译源码.
Is there a way to only download the dependencies but do not compile source.
我之所以这么问,是因为我正在尝试为我的更大项目构建一个 Docker 构建环境.想法是在 docker build 我克隆项目,下载所有依赖项,然后删除代码.然后使用docker run -v将经常变化的代码挂载到docker容器中,开始编译项目.
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.
推荐答案运行 sbt 的 update 命令.将解析和检索依赖项.
Run sbt's update command. Dependencies will be resolved and retrieved.
更多推荐
如何要求 sbt 只获取依赖项而不编译?
发布评论