From d32a84256c7abf53d3ba4b51b095bd44da3bffc7 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 19 Jan 2017 15:54:23 -0800 Subject: [PATCH] Better resolution message. --- .../main/kotlin/com/beust/kobalt/maven/aether/Aether.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt index 20d5db60..b3d2352e 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/Aether.kt @@ -213,8 +213,12 @@ class Aether(localRepo: File, val settings: KobaltSettings, eventBus: EventBus) } } else { val dependencyRequest = DependencyRequest(collectRequest(artifact, artifactScope), scopeFilter) - system.resolveDependencies(session, dependencyRequest).artifactResults.map { - AetherResult(it.artifact, it.repository) + try { + system.resolveDependencies(session, dependencyRequest).artifactResults.map { + AetherResult(it.artifact, it.repository) + } + } catch(ex: Exception) { + throw KobaltException("Couldn't resolve $artifact", ex) } } return result