How to build using SBT in offline mode

心不动则不痛 提交于 2019-12-22 08:52:38

问题


What is the equivalent of mvn -o in SBT? When I check my .ivy repository, I can see the dependecy jars in cache/groupId/artifactId/jars. When I try to build it without internet connection, it still does this Resolving ... thing and shows Unresolved Dependencies error. How can I turn this off? I tried using sbt set-offline := true but still gets the error. Is this possible? Maybe download once and save the artifacts in .m2 like maven and get it from there if its not possible in .ivy


回答1:


Are you sure you got absolutely all your dependencies ?

  • dependencies for SBT => downloaded when SBT starts
  • plugins dependencies => downloaded during project loading
  • Project dependencies => downloaded when the related tasks are started, e.g. compile time deps on 'compile', test deps on 'test', etc...



回答2:


Try set skip in update := true



来源:https://stackoverflow.com/questions/28061342/how-to-build-using-sbt-in-offline-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!