Installing sbt on an offline build server

1,071 views
Skip to first unread message

Prianna Ahsan

unread,
Aug 19, 2015, 10:20:19 PM8/19/15
to sbt-dev
Hey all,

I'm trying to set up sbt support on our build server, which uses Jenkins for CI. I'm currently stuck at the 'install sbt' step (basically, step 1). Is there any way to install sbt offline? The sbt rpm was installed via yum on our build server, and the launch jar attempts to download all of the dependencies from various repos. However, this box is restricted to our intranet for security reasons, so its unable to do so. Is there some way I can move the dependencies it needs into some directory, and point sbt at it?

Here's what happens when I try to build a test hello world project:

$ cat hw.scala 

object Hi { def main(args: Array[String]) = println("Hi!") }

$ sbt

Getting org.scala-sbt sbt 0.13.9 ...

^C

$ sbt -d

[process_args] java_version = '1.7.0_55'

# Executing command line:

java

-Xms1024m

-Xmx1024m

-XX:ReservedCodeCacheSize=128m

-XX:MaxPermSize=256m

-jar

/usr/share/sbt-launcher-packaging/bin/sbt-launch.jar

Getting org.scala-sbt sbt 0.13.9 ...






eugene yokota

unread,
Aug 19, 2015, 11:30:29 PM8/19/15
to sbt...@googlegroups.com
Hi Prianna,

I think it's a good question, but I'm afraid there's no good answer here.
Probably the most enduring solution would be:
1. setup a local Artifactory instance where you do have Internet access.
2. configure the Artifactory instance with all the boot resolvers sbt needs.
3. point sbt to exclusively download JARs from the Artifactory: http://www.scala-sbt.org/0.13/docs/Proxy-Repositories.html
4. export the Artifactory instance and import it to your environment (I've never done it but I am hoping that works)
5. point sbt to the newly imported Artifactory instance in the clean room environment.

Another thing you might want to try is Typesafe Activator, which comes with a preloaded local repository:

There's also some hackery around ~/.sbt/ that you could try but that's implementation specific to sbt 0.13.

-eugene


--
You received this message because you are subscribed to the Google Groups "sbt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sbt-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sbt-dev/dc7dcdd9-2a46-4870-916e-cee7c65a478b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages