"传递解析器"如何与SBT协同工作?

Man*_*rdt 7 ivy 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
  )

}
Run Code Online (Sandbox Code Playgroud)

当我将结果库包含在另一个项目中时,如下所示:

    "eu.delving"         %% "basex-scala-client"         % "0.1-SNAPSHOT"
Run Code Online (Sandbox Code Playgroud)

我尝试构建该项目,我收到一条错误提示我找不到该项目引用的"org.basex%basex%7.2.1"库.

我必须在"客户端"项目中添加解析器才能找到库.有办法避免这种情况吗?

Eug*_*ota 1

没有传递解析器,因此构建用户需要知道所有传递库依赖项的所有解析器。这种方法的好处是,在开源项目上,它鼓励项目发布到连接到已知解析器的已知存储库之一。

对于企业用途,您可以防止流量流向图表中某些依赖项引入的未知位置。

要在组织内共享解析器设置,您可以创建组织范围的插件。