如何要求 sbt 只获取依赖项而不编译?

编程入门 行业动态 更新时间:2024-10-23 07:35:59
本文介绍了如何要求 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 只获取依赖项而不编译?

本文发布于:2023-07-14 21:49:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1107245.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:而不   sbt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!