From 66b39aa21357b596aa890127345c3df4023e6df7 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 16 Mar 2017 14:20:30 -0700 Subject: [PATCH] Log exclusions. --- .../kotlin/com/beust/kobalt/maven/DependencyManager.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/DependencyManager.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/DependencyManager.kt index 6913c8ed..9ff45407 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/DependencyManager.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/DependencyManager.kt @@ -139,8 +139,14 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, * Should probably make exclusion more generic (full on string) or allow exclusion to be specified * formally by groupId or artifactId. */ - fun isDependencyExcluded(dep: IClasspathDependency, excluded: List) - = excluded.any { excluded -> dep.id.startsWith(excluded.id) } + fun isDependencyExcluded(dep: IClasspathDependency, excluded: List): Boolean { + excluded.any { excluded -> dep.id.startsWith(excluded.id) }.let { result -> + if (result) { + context.logger.log(project?.name ?: "", 2, " Excluding dependency $dep") + } + return result + } + } // Dependencies get reordered by transitiveClosure() but since we just added a bunch of new ones, // we need to reorder them again in case we're adding dependencies that are already present