From 77eec73bd0ade654af965bf643ca0932cd21162b Mon Sep 17 00:00:00 2001 From: Christoph Sturm Date: Wed, 9 Dec 2015 21:17:34 +0100 Subject: [PATCH] finish checking versions even if one version cannot be resolved --- src/main/kotlin/com/beust/kobalt/misc/CheckVersions.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/misc/CheckVersions.kt b/src/main/kotlin/com/beust/kobalt/misc/CheckVersions.kt index 034bf176..f6766bea 100644 --- a/src/main/kotlin/com/beust/kobalt/misc/CheckVersions.kt +++ b/src/main/kotlin/com/beust/kobalt/misc/CheckVersions.kt @@ -1,5 +1,6 @@ package com.beust.kobalt.misc +import com.beust.kobalt.api.IClasspathDependency import com.beust.kobalt.api.Project import com.beust.kobalt.maven.DepFactory import com.beust.kobalt.maven.dependency.MavenDependency @@ -20,7 +21,13 @@ public class CheckVersions @Inject constructor(val depFactory : DepFactory, arrayListOf(it.compileDependencies, it.testDependencies).forEach { cds -> cds.forEach { compileDependency -> if (MavenId.isMavenId(compileDependency.id)) { - val dep = depFactory.create(compileDependency.shortId, executor, false /* go remote */) + val dep: IClasspathDependency + try { + dep = depFactory.create(compileDependency.shortId, executor, false /* go remote */) + } catch(e: Exception) { + log(1, "cannot resolve ${compileDependency.shortId}. ignoring") + return@forEach + } if (dep is MavenDependency) { val other = compileDependency as MavenDependency if (dep.id != compileDependency.id