sbt仅获取依赖项 [英] sbt only fetch dependencies

查看:108
本文介绍了sbt仅获取依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法只能下载依赖项,而不编译源代码。

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仅获取依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆