mirror of https://github.com/sbt/sbt.git
Don't return duplicated artifacts from Ivy repos
This commit is contained in:
parent
4cdd95b37e
commit
69ffdeb553
|
|
@ -22,7 +22,7 @@ install:
|
||||||
Set-Location -Path ..
|
Set-Location -Path ..
|
||||||
}
|
}
|
||||||
build_script:
|
build_script:
|
||||||
- sbt ++2.11.11 clean compile coreJVM/publishLocal
|
- sbt ++2.11.11 clean compile coreJVM/publishLocal cli/publishLocal
|
||||||
- sbt ++2.12.1 http-server/publishLocal
|
- sbt ++2.12.1 http-server/publishLocal
|
||||||
- sbt ++2.10.6 clean compile
|
- sbt ++2.10.6 clean compile
|
||||||
- sbt ++2.12.1 coreJVM/publishLocal cache/publishLocal extra/publishLocal # to make the scripted sbt 1.0 tests happy
|
- sbt ++2.12.1 coreJVM/publishLocal cache/publishLocal extra/publishLocal # to make the scripted sbt 1.0 tests happy
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ final case class IvyRepository(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val retainedWithUrl = retained.flatMap { p =>
|
val retainedWithUrl = retained.distinct.flatMap { p =>
|
||||||
pattern.substituteVariables(variables(
|
pattern.substituteVariables(variables(
|
||||||
dependency.module,
|
dependency.module,
|
||||||
Some(project.actualVersion),
|
Some(project.actualVersion),
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ launchProxyRepos() {
|
||||||
|
|
||||||
integrationTestsRequirements() {
|
integrationTestsRequirements() {
|
||||||
# Required for ~/.ivy2/local repo tests
|
# Required for ~/.ivy2/local repo tests
|
||||||
sbt ++2.11.11 coreJVM/publishLocal
|
sbt ++2.11.11 coreJVM/publishLocal cli/publishLocal
|
||||||
|
|
||||||
sbt ++2.12.1 http-server/publishLocal
|
sbt ++2.12.1 http-server/publishLocal
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,30 @@ object IvyLocalTests extends TestSuite {
|
||||||
val extraRepo = Some(Cache.ivy2Local)
|
val extraRepo = Some(Cache.ivy2Local)
|
||||||
|
|
||||||
// Assuming this module (and the sub-projects it depends on) is published locally
|
// Assuming this module (and the sub-projects it depends on) is published locally
|
||||||
* - CentralTests.resolutionCheck(
|
'resolution - CentralTests.resolutionCheck(
|
||||||
module, version,
|
module, version,
|
||||||
extraRepo
|
extraRepo
|
||||||
)
|
)
|
||||||
|
|
||||||
|
'uniqueArtifacts - async {
|
||||||
|
|
||||||
* - async {
|
val res = await(CentralTests.resolve(
|
||||||
|
Set(Dependency(Module("io.get-coursier", "coursier-cli_2.11"), version, transitive = false)),
|
||||||
|
extraRepo = extraRepo
|
||||||
|
))
|
||||||
|
|
||||||
|
val artifacts = res.dependencyClassifiersArtifacts(Seq("standalone"))
|
||||||
|
.map(_._2)
|
||||||
|
.filter(a => a.`type` == "jar" && !a.isOptional)
|
||||||
|
.map(_.url)
|
||||||
|
.groupBy(s => s)
|
||||||
|
|
||||||
|
assert(artifacts.nonEmpty)
|
||||||
|
assert(artifacts.forall(_._2.length == 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
'javadocSources - async {
|
||||||
val res = await(CentralTests.resolve(
|
val res = await(CentralTests.resolve(
|
||||||
Set(Dependency(module, version)),
|
Set(Dependency(module, version)),
|
||||||
extraRepo = extraRepo
|
extraRepo = extraRepo
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue