I’m not a developer. I need to launch a scala code without access to Internet. Where and what I should place a lines to launch “sbt clean test”? Dependencies and plugins are there. Now I have an error that some plugin dependencies are needed (connection timeout).
Asked
Active
Viewed 41 times
0
-
1You could create a stub project which has the same dependencies as you project without access to the internet. Then "compile" it to download all dependencies. They should be cached in `.sbt` (sbt global settings and caches) and `.ivy2` (Ivy2 caches for dependencies). Then it should work if you copy these 2 directories to the computer that run offline - sbt should not need to download anythingfor itself and for the project all dependencies would be in local Ivy2 cache. But I might be missing something. – Mateusz Kubuszok Feb 11 '23 at 20:14
-
https://stackoverflow.com/questions/56545756/use-scala-on-computer-without-internet-connection https://stackoverflow.com/questions/24395307/working-offline-with-sbt-and-snapshot-dependencies https://stackoverflow.com/questions/17045999/using-sbt-on-a-remote-node-without-internet-access-via-ssh – Dmytro Mitin Feb 11 '23 at 20:42
-
Maybe I'm wrong but I guess for a normal work sbt needs internet connection. In order to work offline some people use fat jar (uber jar) with dependencies created by sbt-assembly https://github.com/sbt/sbt-assembly An alternative to sbt-assembly can be sbt launcher https://www.scala-sbt.org/1.x/docs/Sbt-Launcher.html https://stackoverflow.com/questions/74440324/sbt-gives-java-lang-nullpointerexception-when-trying-to-run-spark – Dmytro Mitin Feb 11 '23 at 20:46