Wei Chao
Wei Chao

Reputation: 3

how to install sbt offline or without internet

I want to use scala sbt in a local server, which cannot connect to the internet.

So far what I got to know is that I have to install sbt with internet. I also tried to first install sbt in a server that can access the internet, compress all the sbt files as a zip and then send them to the server without internet. However this leads to a lot of dependency errors and it wants to download things again.

How can I install the sbt offline?

Upvotes: 0

Views: 1353

Answers (1)

Mateusz Kubuszok
Mateusz Kubuszok

Reputation: 27595

Personally, I would try to use some sbt wrapper like sbt-extras instead of globally installed package. It tries to check sbt version, download it into cache, then run it with some better defaults.

Once you started using that to start sbt, you could copy your local sbt cache ~/.sbt, Ivy2 cache ~/.ivy2 and/or Coursier cache (slightly harder to find) (if I am not mistaken since 1.3 Coursier is used out of the box, before it was Ivy) from your computer to your offline machine.

This is required because you won't be able not only to install sbt but also libraries you need to compile the project.

Upvotes: 1

Related Questions