1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

[GITHUB-199] Don't display errors if a .jar file can't be resolved.

Fixes https://github.com/cbeust/kobalt/issues/199
This commit is contained in:
Cedric Beust 2016-05-14 07:43:13 -07:00
parent 1a76aca791
commit 4468ddfac5
2 changed files with 6 additions and 3 deletions

View file

@ -7,7 +7,6 @@ import com.beust.kobalt.maven.dependency.FileDependency
import com.beust.kobalt.misc.KFiles
import com.beust.kobalt.misc.KobaltExecutors
import com.beust.kobalt.misc.log
import com.beust.kobalt.misc.warn
import com.google.common.collect.ArrayListMultimap
import java.io.File
import java.util.*
@ -132,7 +131,7 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val
val nonexistent = reordered.filter{ ! it.jarFile.get().exists() }
if (nonexistent.any()) {
warn("Nonexistent dependencies: $nonexistent")
log(2, "[Warning] Nonexistent dependencies: $nonexistent")
}
val result2 = reordered.filter {

View file

@ -141,7 +141,11 @@ class Aether(val localRepo: File, val settings: KobaltSettings) {
val result = system.resolveDependencies(session, dependencyRequest).artifactResults
return result
} catch(ex: DependencyResolutionException) {
warn("Couldn't resolve $artifact")
if (artifact.extension == "pom") {
// Only display a warning for .pom files. Not resolving a .jar or other artifact
// is not necessarily an error as long as there is a pom file.
warn("Couldn't resolve $artifact")
}
return emptyList()
}
}