ary*_*rya 3 scala multi-project sbt xsbt-web-plugin
在这个似乎涉及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)
}
Run Code Online (Sandbox Code Playgroud)
[根] /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")
Run Code Online (Sandbox Code Playgroud)
[根] /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/"
Run Code Online (Sandbox Code Playgroud)
[根] /server/build.sbt
scalaVersion := "2.10.1"
seq(webSettings :_*)
Run Code Online (Sandbox Code Playgroud)