1

I am using IntelligJ

IntelliJ IDEA 2016.2.4 Build #IC-162.2032.8, built on September 9, 2016 JRE: 1.8.0_101-b13 amd64 JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

I am tring to import my existing scala projects which using SBT 0.12.4. But I am getting error

SBT 0.12.4+ required. Please update the project definition

As per some suggetions( Sbt 0.12.4+ required on project import ) I changed SBT version to 0.13.8 in build.properties and I am tring to import again, But this time, I am getting diffrent errors

Unresolved dependencies:

com.github.mpeltonen#sbt-idea;1.4.0: not found

io.spray#sbt-revolver;0.6.2: not found

com.typesafe.sbt#sbt-osgi;0.5.0: not found

com.typesafe.sbt#sbt-scalariform;1.0.1: not found

com.orrsella#sbt-sublime;1.0.5: not found

org.ensime#ensime-sbt-cmd;0.1.1: not found

net.virtual-void#sbt-dependency-graph;0.7.3: not found

org.xerial.sbt#sbt-pack;0.2.4: not found

I found that these libraries will be available with 0.12.4

Kindly let me know, how can I make it work please.

is there any way to change the SBT version in IntelliJ idea. By default it is using SBT 0.13.8 that I found by creating sample Scala SBT project, and run the inspect sbtVersion command in idea terminal.

Community
  • 1
  • 1
Sun
  • 3,444
  • 7
  • 53
  • 83

2 Answers2

3

In your ${projectRoot}/project/build.properties, you can specify explicitly the sbt version like this:

sbt.version=0.12.4

And run sbt in the command line to see whether the dependencies will be resolved. If it is still unresolvable, perhaps you have to either 1) add other resolvers for these (old) packages or 2) build dependence projects from source and put them in proper places (unmanaged libraries or firstly publish locally).

If you are really lucky, then you can try in Intellij (sbt-idea is no longer necessary now).

Please notice that some of the dependencies can actually be removed, for example sbt-sublime, ensime.

Hongxu Chen
  • 5,240
  • 2
  • 45
  • 85
0

Most of the listed plugins are available in a newer version for sbt 0.13. You can try updating them or removing them if they are not required anymore (such as sbt-idea). If you did set the project to use sbt 0.12.4, all the plugins can be resolved and the import still doesn't work, please report it at https://youtrack.jetbrains.com/issues/SCL

Justin Kaeser
  • 5,868
  • 27
  • 46