Scala-cli downloads from https://github.com/coursier/jvm-index/raw/master/index.json

On an air-gapped machine (without internet access), but connected to a reasonable comprehensive nexus “Maven-public” repository on the local network, I have setup a scala-cli project.

All works well for compiling/running the project (via scala-cli run .) with the the normal Java/Scala packages: They are downloaded from Nexus and used correctly in the project.

Now I want to create a native executable, so I run scala-cli package --native-image . But after compiling scala-cli tries to download:

https://github.com/coursier/jvm-index/raw/master/index.json

scala-cli stops here with a download error, because this stuff is probably not on Nexus.

What would I need to do in order to have the bits and pieces locally around for building native images?

Thanks for any pointers!

Just a guess:

--native-image will try to download some GraalVM stuff, maybe try just --native via Scala Native? (Of course if you are using libraries not supporting SN then you’re out of luck)

2 Likes

Ups, that’s it! I misstook the --native-image option as the flag which builds Scala native exes…

1 Like