0
votes

I am new to Intellij IDE.

I have created a SBT project on Intellij(2016.1.3). whenever i finish project create wizard, its started downloading sbt, scala versions through internet.But I want to use locally installed sbt,scala versions. I have read below thread; My SBT don't have 'sbt-launch.jar'

How to use custom sbt version in intellij idea 14?

locally installed SBT version :0.13.11 ( in Ubuntu file system, it is with " .sbt " name, as hidden folder) & Scala Version :2.10.5 (java 1.8)

Kindly, plzz tell me how to use locally installed versions in SBT project.

Thanks in advance, Raghav

1
@MikeCheel : I have read that . In 4th point screenshot, there is "download : source , Source for SBT and plugins" check box. it causing download scala SBT through internet. Thanks alot for response.Raghav
Your best bet would be to put in a ticket with jet brains for this: intellij-support.jetbrains.com/hc/en-us You can click submit a request in the upper right of the page. They usually get back to you within 8 hours although my experience has been it is normally even faster than that.Mike Cheel

1 Answers

0
votes

My SBT don't have 'sbt-launch.jar'.

If SBT is properly installed, then there is a sbt-launch.jar somwhere. Assuming you installed SBT with the DEB package, you should be able to list installed files with the command dpkg -L sbt.

locally installed SBT version :0.13.11 ( in Ubuntu file system, it is with " .sbt " name, as hidden folder)

Sounds like you are talking about the ~/.sbt folder? This is SBT's default location for storing user data (user-specific configuration, but also some cached downloads), not the installation folder.

But I want to use locally installed sbt,scala versions.

There are actually three elements to consider:

  • The SBT laucher (sbt-launch.jar)
  • SBT itself
  • Scala (compiler & standard library)

For the SBT launcher, you can use your own install or let Intellij download its own copy.

For SBT, realistically, I think it will have to be downloaded by the SBT launcher. The version of SBT to use is specified in <my project>/project/build.properties.

For Scala, you can let SBT download it (usually recommended; configure the version to use in your build.sbt) or use a local version.

If you really want to use a local Scala version, this is explained in the SBT documentation: you should just need to configure scalaHome in you build.sbt:

scalaHome := Some(file("/home/user/scala-2.10/"))

But keep in mind that this will make you build less repeatable, both on other computers or on the same computer after a few months have passed... And managing several projects which may require different versions of Scala will also be more difficult.