4

xsbt-web-plugin が関与しているように見えるこの奇妙なケースでは、エラーが発生します

unresolved dependency: play#play-json_2.10;2.2-SNAPSHOT: not found

serverサブプロジェクトをロードするとき。依存関係と正しいリゾルバーは、依存するlibraryサブプロジェクトで指定されserverます。サーバーに含めなくても爆発しませんがwebSettings、そこに .war を構築しようとしています。

[ルート]/project/Build.scala

import sbt._
import Keys._

object MyBuild extends Build {
  lazy val root = Project("root", base = file(".")).aggregate(library,server)

  lazy val library = Project(id = "library", base = file("library"))

  lazy val server = Project(id = "server", base = file("server")).dependsOn(library)
}

[ルート]/project/plugins.sbt

// p.s. why do I need this here instead of [root]/server/project/plugins.sbt?
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.3.0")

[ルート]/library/build.sbt

scalaVersion := "2.10.1"

libraryDependencies += "play" %% "play-json" % "2.2-SNAPSHOT"

resolvers += "Mandubian repository snapshots" at "https://github.com/mandubian/mandubian-mvn/raw/master/snapshots/"

[ルート]/server/build.sbt

scalaVersion := "2.10.1"

seq(webSettings :_*)
4

1 に答える 1

10

を使用resolvers in ThisBuild += ...して、ビルドの任意のサブ プロジェクトでリゾルバーを使用できるようにすることができます。(それは に入り[root]/build.sbtます。)

于 2013-06-18T20:51:24.950 に答える