sbt - Unable to add scala-reflect as a dependency -


i can't add scala-reflect dependency. project/build.sbt looks this:

//the name of project, become name of war file when run package command. name := "test-sbt"  version := "1.0"  //specify scala version using in project. scalaversion := "2.10.3"  librarydependencies <++= (scalaversion)(sv =>   seq(     "org.scala-lang" % "scala-reflect" % "2.10.3",     "org.scala-lang" % "scala-compiler" % "2.10.3"   ) ) 

and project/build.properties

sbt.version=0.13.0 

and here main class:

object main1 extends app {   import scala.reflect.runtime.universe   val runtimemirror = universe.runtimemirror(getclass.getclassloader)   //...... } 

it says object runtime not member of package reflect. of course, did "gen-idea", "clean" , other things. what's that?

guessing here due question @laughedelic.

the build.sbt should in root. assuming project writing in test-sbt, should end structure similar to:

test-sbt/build.sbt  test-sbt/project  

otherwise build.sbt used in creating "internal compile project" used sbt.

a deeper explanation can found @ sbt's docs sbt recursive.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -