简体   繁体   English

如何在没有编译/检查的情况下运行“sbt run”?

[英]How to run "sbt run" without compilation/checks?

VPS has low memory and cannot run compilation without crashing. VPS内存不足,无法运行编译而不崩溃。 I cannot generate working fat-jar (tried a lot of stuff with sbt-assembly, sbt-native-packager and sbt-start-script without any success).我无法生成工作 fat-jar(尝试了很多 sbt-assembly、sbt-native-packager 和 sbt-start-script 的东西,但没有成功)。

I am not asking how to create a fat-jar.我不是在问如何创建一个胖罐。

Question:题:
How to prepare (I guess just compile it on other machine) and how to "sbt run" without triggering dependency checks and compilation?如何准备(我猜只是在其他机器上编译它)以及如何在不触发依赖项检查和编译的情况下“运行 sbt”?

Is there a possibility to build the JAR outside of the server and just push the JAR over?是否有可能在服务器外部构建 JAR 并将 JAR 推送过来? If this is your production server of some sort, you don't want to include compiler dependent libraries on the server.如果这是您的某种生产服务器,您不希望在服务器上包含编译器相关库。

May be try:可以尝试:

offline := true

Or perhaps,也许,

cleanKeepFiles ++= Seq("resolution-cache", "streams").map(target.value / _)

Which should sort of avoid doing the resolution check!应该避免进行分辨率检查!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM