6
我有以下項目建設:「transitive resolvers」如何與SBT一起使用?
import sbt._
import Keys._
object ProjectBuild extends Build {
val buildVersion = "0.1-SNAPSHOT"
val delvingReleases = "Delving Releases Repository" at "http://development.delving.org:8081/nexus/content/repositories/releases"
val delvingSnapshots = "Delving Snapshot Repository" at "http://development.delving.org:8081/nexus/content/repositories/snapshots"
val delvingRepository = if (buildVersion.endsWith("SNAPSHOT")) delvingSnapshots else delvingReleases
lazy val root = Project(
id = "basex-scala-client",
base = file(".")
).settings(
organization := "eu.delving",
version := buildVersion,
resolvers += "BaseX Repository" at "http://files.basex.org/maven",
libraryDependencies += "org.basex" % "basex" % "7.2.1",
libraryDependencies += "org.specs2" %% "specs2" % "1.7.1" % "test",
publishTo := Some(delvingRepository),
credentials += Credentials(Path.userHome/".ivy2"/".credentials"),
publishMavenStyle := true
)
}
當我包括在其他項目所產生的圖書館,像這樣:
"eu.delving" %% "basex-scala-client" % "0.1-SNAPSHOT"
,我嘗試構建一個項目,我得到一個錯誤提示我該項目引用的「org.basex%basex%7.2.1」庫無法找到。
我必須去「client」項目中添加解析器,以便找到庫。有沒有辦法避免這種情況?
只要確保我理解正確:當我使用另一個解析器中有依賴關係的庫時,我需要手動添加解析器上游 - 是嗎? –