How do "transition resolvers" work with SBT?

I have the following build of the project:

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 ) } 

When I include the resulting library in another project, for example:

  "eu.delving" %% "basex-scala-client" % "0.1-SNAPSHOT" 

and I try to create this project, I get an error message indicating that the library "org.basex% basex% 7.2.1" referenced by this project was not found.

I need to go and add a resolver to the client project so that the library is found. Is there any way to avoid this?

+6
source share
1 answer

There are no transitive resolvers, so the assembly user needs to know all the solvers of all the transitive library dependencies. The advantage of this approach is that in open source projects, it encourages projects to be published in one of the well-known repositories associated with well-known converters.

For corporate use, you can prevent traffic from going to unknown places entered by some dependencies on a schedule.

To share recognizer settings in an organization, you can create an org-wide plugin.

+1
source

Source: https://habr.com/ru/post/916490/


All Articles