Scala Slick 2.0.0的构建错误

时间:2014-02-24 06:19:04

标签: scala sbt slick

我正在尝试构建scala slick但是会​​出现以下错误:

adongre@pnq-adongre1:/adongre1/external/scala-slick/slick/project> sbt --version
sbt launcher version 0.13.0

adongre@pnq-adongre1:/adongre1/external/scala-slick/slick/project> scala -version
Scala code runner version 2.10.3 -- Copyright 2002-2013, LAMP/EPFL

adongre@pnq-adongre1:/adongre1/external/scala-slick/slick/project> sbt compile             
[info] Set current project to project (in build file:/adongre1/external/scala-slick/slick/project/)
[info] Compiling 1 Scala source to /adongre1/external/scala-slick/slick/project/target/scala-2.10/classes...
[error] /adongre1/external/scala-slick/slick/project/Build.scala:2: not found: object Keys
[error] import Keys._
[error]        ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:3: not found: object Tests
[error] import Tests._
[error]        ^
[error] bad symbolic reference. A signature in SbtSite.class refers to type Plugin
[error] in package sbt which is not available.
[error] It may be completely missing from the current classpath, or the version on
[error] the classpath might be incompatible with the version used when compiling SbtSite.class.
[error] /adongre1/external/scala-slick/slick/project/Build.scala:7: not found: type Build
[error] object SlickBuild extends Build {
[error]                           ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:10: not found: value SettingKey
[error]   val repoKind = SettingKey[String]("repo-kind", "Maven repository kind (\"snapshots\" or \"releases\")")
[error]                  ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:13: not found: value scalaVersion
[error]     scalaVersion := "2.10.3",
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:16: not found: value libraryDependencies
[error]     libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ % "optional")
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:19: not found: type Setting
[error]   def localScalaSettings(path: String): Seq[Setting[_]] = Seq(
[error]                                             ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:20: not found: value scalaVersion
[error]     scalaVersion := "2.10.0-unknown",
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:21: not found: value scalaBinaryVersion
[error]     scalaBinaryVersion := "2.10.0-unknown",
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:22: not found: value crossVersion
[error]     crossVersion := CrossVersion.Disabled,
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:23: not found: value scalaHome
[error]     scalaHome := Some(file(path)),
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:24: not found: value autoScalaLibrary
[error]     autoScalaLibrary := false,
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:25: not found: value unmanagedJars
[error]     unmanagedJars <<= scalaInstance.map( _.jars.classpath),
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:26: not found: value unmanagedJars
[error]     unmanagedJars in config("compile") <<= scalaInstance.map( _.jars.classpath),
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:27: not found: value unmanagedJars
[error]     unmanagedJars in config("test") <<= scalaInstance.map( _.jars.classpath),
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:28: not found: value unmanagedJars
[error]     unmanagedJars in config("macro") <<= scalaInstance.map( _.jars.classpath)
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:40: not found: type Setting
[error]   def ifPublished(s: Seq[Setting[_]]): Seq[Setting[_]] =
[error]                                            ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:40: not found: type Setting
[error]   def ifPublished(s: Seq[Setting[_]]): Seq[Setting[_]] =
[error]                          ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:43: not found: type Setting
[error]   def extTarget(extName: String, t: Option[String]): Seq[Setting[File]] = {
[error]                                                          ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:45: not found: value target
[error]       case null => t.map(f => Seq(target := file(f))).getOrElse(Seq.empty)
[error]                                   ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:46: not found: value target
[error]       case path => Seq(target := file(path + "/" + extName))
[error]                        ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:51: not found: value version
[error]     version := "2.0.0",
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:93: not found: value Project
[error]   lazy val aRootProject = Project(id = "root", base = file("."),
[error]                           ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:100: not found: type Project
[error]   lazy val slickProject: Project = Project(id = "slick", base = file("."),
[error]                          ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:100: not found: value Project
[error]   lazy val slickProject: Project = Project(id = "slick", base = file("."),
[error]                                    ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:128: value % is not a member of String
[error]     "ch.qos.logback" % "logback-classic" % "0.9.28",
[error]                      ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:129: value % is not a member of String
[error]     "com.h2database" % "h2" % "1.3.170",
[error]                      ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:130: value % is not a member of String
[error]     "org.xerial" % "sqlite-jdbc" % "3.7.2",
[error]                  ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:131: value % is not a member of String
[error]     "org.apache.derby" % "derby" % "10.9.1.0",
[error]                        ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:132: value % is not a member of String
[error]     "org.hsqldb" % "hsqldb" % "2.2.8"
[error]                  ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:135: not found: value Project
[error]   lazy val slickTestkitProject = Project(id = "testkit", base = file("slick-testkit"),
[error]                                  ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:178: not found: value config
[error]   lazy val DocTest = config("doctest") extend(Test)
[error]                      ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:181: not found: type TestDefinition
[error]   def partitionTests(tests: Seq[TestDefinition]) = {
[error]                                 ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:184: not found: type Group
[error]       new Group("fork", fork, SubProcess(ForkOptions())),
[error]           ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:185: not found: type Group
[error]       new Group("inProcess", notFork, InProcess)
[error]           ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:190: not found: value TaskKey
[error]   lazy val fmpp = TaskKey[Seq[File]]("fmpp")
[error]                   ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:191: not found: value config
[error]   lazy val fmppConfig = config("fmpp") hide
[error]                         ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:192: not found: value inConfig
[error]   lazy val fmppSettings = inConfig(Compile)(Seq(sourceGenerators <+= fmpp, fmpp <<= fmppTask)) ++ Seq(
[error]                           ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:213: not found: value fullClasspath
[error]     (fullClasspath in fmppConfig, runner in fmpp, sourceManaged, streams, sourceDirectory) map { (cp, r, output, s, srcDir) =>
[error]      ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:227: not found: value TaskKey
[error]   lazy val typeProviders = TaskKey[Seq[File]]("Type provider code generation")
[error]                            ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:228: not found: value config
[error]   lazy val typeProvidersConfig = config("codegen").hide
[error]                                  ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:230: not found: value inConfig
[error]     inConfig(typeProvidersConfig)(Defaults.configSettings) ++
[error]     ^
[error] /adongre1/external/scala-slick/slick/project/Build.scala:253: not found: value fullClasspath
[error]     (fullClasspath in typeProvidersConfig, runner in typeProviders, sourceManaged in Test, streams, sourceDirectory, sourceDirectory in slickProject) map { (cp, r, output, s, srcDir, slickSrc) =>
[error]      ^
[error] 44 errors found
[error] (compile:compile) Compilation failed
[error] Total time: 3 s, completed Feb 24, 2014 11:47:38 AM

1 个答案:

答案 0 :(得分:4)

您正在尝试在项目目录中进行编译。将目录更改为/adongre1/external/scala-slick/slick/,然后运行sbt compile