|
ScalaJars
sbt has movedsbt has now completely moved to GitHub. See https://github.com/harrah/xsbt/wiki/Library-Management. Scala Jars and Dependency Managementsbt checks and filters managed dependencies on Scala libraries, such as scala-library.jar and scala-compiler.jar. This page explains the details of this behavior. Explicit Scala Dependenciessbt checks that the revisions of any explicit dependencies on Scala libraries match that of the scala.version declared for the project. For example, sbt would generate an error if you defined scala.version to be 2.7.2 but had the following in your project definition:val scalaSwing = "org.scala-lang" % "scala-swing" % "2.7.3" To disable this check, set: override def checkExplicitScalaDependencies = true Filtering Scala Dependenciessbt excludes all dependencies on scala-library.jar and scala-compiler.jar so that these will not be downloaded. sbt does this because it already provides the right versions of scala-library.jar and scala-compiler.jar required for normal use. In particular,
If you need to explicitly reference the Scala jars used by sbt, see the Access to Scala Jars and Dependencies section below. sbt can be configured to skip these checks in certain cases, but this should be considered atypical. If you want to do this anyway, you should define a non-standard configuration and exclude it from the configurations on which sbt performs checks and filtering: val other = config("scalac-2.7.3")
override def checkScalaInConfigurations = super.checkScalaInConfigurations - other
val scalac2_7_3 = "org.scala-lang" % "scala-compiler" % "2.7.3" % "scalac-2.7.3"You might use this to call java using the classpath given by managedClasspath("scalac-2.7.3"), for example. To completely disable all filtering of dependencies, set override def filterScalaJars = false Access to Scala Jars and Dependencies
| |
The buildScalaInstance is called on an Project instance.