从github导入SBT项目时出错

时间:2015-03-12 18:23:59

标签: scala sbt

我正在尝试将项目从git repo导入到我的项目中。这是我在Build.scala文件中的内容

object MyBuild extends Build {

  val appName = "bitcoinj-playground"
  val appV = "1.0" 
  val scalaV = "2.11.4"

    val sprayV = "1.3.2"
    val akkaV = "2.3.8" 
    val bootstrapV = "3.3.2"
    val webJarsPlayV = "2.3.0"

  val appDependencies = Seq(
    "io.spray"            %%  "spray-can"     % sprayV withSources() withJavadoc(),
    "io.spray"            %%  "spray-routing" % sprayV withSources() withJavadoc(),
    "io.spray"            %%  "spray-testkit" % sprayV  % "test" withSources() withJavadoc(),
    "com.typesafe.akka"   %%  "akka-actor"    % akkaV withSources() withJavadoc(),
    "com.typesafe.akka"   %%  "akka-testkit"  % akkaV   % "test" withSources() withJavadoc(),
    "org.specs2"          %%  "specs2-core"   % "2.4.7-scalaz-7.0.6" % "test" withSources() withJavadoc(),
      "org.scalactic"               %%  "scalactic"     %   "2.2.1" % "test" withSources() withJavadoc(),
      "io.spray"            %%  "spray-json"    % "1.3.0" withSources() withJavadoc(),
      "com.github.nscala-time" %% "nscala-time" % "1.6.0" withSources() withJavadoc() ,
    "com.typesafe.play" %% "play-mailer" % "2.4.0"

  )

  val main = Project(appName, file(".")).dependsOn(Projects.depProject).settings(
    version := appV,
    scalaVersion := scalaV, 
    resolvers += Resolver.sonatypeRepo("releases"),  
    libraryDependencies ++= appDependencies
  )
}

object Projects {
  lazy val depProject = RootProject(uri("https://github.com/bitcoinj/bitcoinj.git"))
}

这是我得到的错误

Error:Error while importing SBT project:
...
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:71)
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:66)
    at sbt.Using.apply(Using.scala:25)
    at sbt.MainLoop$.runWithNewLog(MainLoop.scala:66)
    at sbt.MainLoop$.runAndClearLast(MainLoop.scala:49)
    at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:33)
    at sbt.MainLoop$.runLogged(MainLoop.scala:25)
    at sbt.StandardMain$.runManaged(Main.scala:57)
    at sbt.xMain.run(Main.scala:29)
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
    at xsbt.boot.Launch$.run(Launch.scala:109)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
    at xsbt.boot.Launch$.launch(Launch.scala:117)
    at xsbt.boot.Launch$.apply(Launch.scala:19)
    at xsbt.boot.Boot$.runImpl(Boot.scala:44)
    at xsbt.boot.Boot$.main(Boot.scala:20)
    at xsbt.boot.Boot.main(Boot.scala)
[error] Couldn't run: ScopedKey(Scope(Select(ProjectRef(file:/home/chris/dev/bitcoinj-playground-sbt-project/,bitcoinj-playground)),This,This,This),update)
[error] Use 'last' for the full log.

See complete log in /tmp/sbt2.log

我正在尝试从github导入bitcoinj项目到我的项目中。特别是主分支。当我用dependsOn运算符添加它时,似乎我的sbt不会运行。这是为什么?

0 个答案:

没有答案