mirror of
https://github.com/sbt/sbt.git
synced 2026-09-03 16:39:24 +02:00
Add non-reg tests for Nexus proxies
Ensure everything work fine again with those (things went bad at 1.0.0-RC1, because of the use of directory listings, that may not be exhaustive in proxies - or may be just empty, e.g. currently with nexus 3)
This commit is contained in:
@@ -675,16 +675,47 @@ class Helper(
|
||||
val task = Task.gatherUnordered(tasks)
|
||||
|
||||
val results = task.unsafePerformSync
|
||||
val errors = results.collect{case (artifact, -\/(err)) => artifact -> err }
|
||||
val files0 = results.collect{case (artifact, \/-(f)) => f }
|
||||
|
||||
val (ignoredErrors, errors) = results
|
||||
.collect {
|
||||
case (artifact, -\/(err)) =>
|
||||
artifact -> err
|
||||
}
|
||||
.partition {
|
||||
case (a, err) =>
|
||||
val notFound = err match {
|
||||
case _: FileError.NotFound => true
|
||||
case _ => false
|
||||
}
|
||||
a.isOptional && notFound
|
||||
}
|
||||
|
||||
val files0 = results.collect {
|
||||
case (artifact, \/-(f)) =>
|
||||
f
|
||||
}
|
||||
|
||||
logger.foreach(_.stop())
|
||||
|
||||
if (verbosityLevel >= 2)
|
||||
errPrintln(
|
||||
" Ignoring error(s):\n" +
|
||||
ignoredErrors
|
||||
.map {
|
||||
case (artifact, error) =>
|
||||
s"${artifact.url}: $error"
|
||||
}
|
||||
.mkString("\n")
|
||||
)
|
||||
|
||||
exitIf(errors.nonEmpty) {
|
||||
s" Error:\n" +
|
||||
errors.map { case (artifact, error) =>
|
||||
s"${artifact.url}: $error"
|
||||
}.mkString("\n")
|
||||
errors
|
||||
.map {
|
||||
case (artifact, error) =>
|
||||
s"${artifact.url}: $error"
|
||||
}
|
||||
.mkString("\n")
|
||||
}
|
||||
|
||||
files0
|
||||
|
||||
Reference in New Issue
Block a user