Fixes #2573 (#2574) Fixes dependency-management /cached-resolution-configurations

Ref #2513, #2435
This commit is contained in:
eugene yokota 2016-04-24 13:28:28 -04:00
parent 265cbd78b1
commit 6a0c5c6a3e
1 changed files with 22 additions and 16 deletions

View File

@ -1,22 +1,28 @@
def myResolver = resolvers += Resolver.file("buggy", file("repo"))(
Patterns(
ivyPatterns = Seq("[organization]/[module]/[revision]/ivy.xml"),
artifactPatterns = Seq("[organization]/[module]/[revision]/[artifact]"),
isMavenCompatible = false,
descriptorOptional = true,
skipConsistencyCheck = true
)
)
def commonSettings: Seq[Def.Setting[_]] =
Seq(
organization := "com.example",
ivyPaths := new IvyPaths( (baseDirectory in ThisBuild).value, Some((baseDirectory in LocalRootProject).value / "ivy-cache")),
dependencyCacheDirectory := (baseDirectory in LocalRootProject).value / "dependency",
resolvers += Resolver.file("buggy", (baseDirectory in LocalRootProject).value / "repo")(
Patterns(
ivyPatterns = Seq("[organization]/[module]/[revision]/ivy.xml"),
artifactPatterns = Seq("[organization]/[module]/[revision]/[artifact]"),
isMavenCompatible = false,
descriptorOptional = true,
skipConsistencyCheck = true
)
)
)
lazy val a = project settings(
myResolver,
updateOptions := updateOptions.value.withCachedResolution(true), //comment this line to make ws compile
libraryDependencies += "a" % "b" % "1.0.0" % "compile->runtime",
libraryDependencies += "a" % "b" % "1.0.0" % "compile->runtime2"
commonSettings,
updateOptions := updateOptions.value.withCachedResolution(true), //comment this line to make ws compile
libraryDependencies += "a" % "b" % "1.0.0" % "compile->runtime",
libraryDependencies += "a" % "b" % "1.0.0" % "compile->runtime2"
)
lazy val b = project dependsOn(a) settings(
myResolver,
updateOptions := updateOptions.value.withCachedResolution(true), //comment this line to make ws compile
libraryDependencies += "a" % "b" % "1.0.1" % "compile->runtime"
commonSettings,
updateOptions := updateOptions.value.withCachedResolution(true), //comment this line to make ws compile
libraryDependencies += "a" % "b" % "1.0.1" % "compile->runtime"
)