如何要求sbt仅获取依赖项,而不进行编译? [英] How to ask sbt to only fetch dependencies, without compiling?

查看:58
本文介绍了如何要求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天全站免登陆