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 c57eeef5..968056b6 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 @@ -1,6 +1,7 @@ package com.beust.kobalt.maven import com.beust.kobalt.api.* +import com.beust.kobalt.maven.aether.ConsoleRepositoryListener import com.beust.kobalt.maven.aether.KobaltAether import com.beust.kobalt.maven.dependency.FileDependency import com.beust.kobalt.misc.KFiles @@ -108,7 +109,7 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val var result = hashSetOf() dependencies.forEach { projectDependency -> - log(3, "$indent Resolving $projectDependency") + log(ConsoleRepositoryListener.LOG_LEVEL, "$indent Resolving $projectDependency") result.add(projectDependency) projectDependency.id.let { result.add(create(it)) 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 15268130..5120c7ad 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 @@ -49,7 +49,7 @@ class KobaltAether @Inject constructor (val settings: KobaltSettings, val aether } fun resolve(id: String): DependencyResult { - log(3, "Resolving $id") + log(ConsoleRepositoryListener.LOG_LEVEL, "Resolving $id") val results = aether.resolve(DefaultArtifact(MavenId.toKobaltId(id))) if (results != null && results.size > 0) { return DependencyResult(AetherDependency(results[0].artifact), results[0].repository.toString()) @@ -201,11 +201,11 @@ class AetherDependency(val artifact: Artifact): IClasspathDependency, Comparable if (! it.dependency.isOptional) { result.add(AetherDependency(it.artifact)) } else { - log(3, "Skipping optional dependency " + deps.root.artifact) + log(ConsoleRepositoryListener.LOG_LEVEL, "Skipping optional dependency " + deps.root.artifact) } } } else { - log(3, "Skipping optional dependency " + deps.root.artifact) + log(ConsoleRepositoryListener.LOG_LEVEL, "Skipping optional dependency " + deps.root.artifact) } } else { warn("Couldn't resolve $artifact") diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/ConsoleRepositoryListener.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/ConsoleRepositoryListener.kt index 0399f3ae..dc55b290 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/ConsoleRepositoryListener.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/aether/ConsoleRepositoryListener.kt @@ -9,7 +9,9 @@ import java.io.PrintStream * A simplistic repository listener that logs events to the console. */ class ConsoleRepositoryListener @JvmOverloads constructor(out: PrintStream? = null) : AbstractRepositoryListener() { - val LOG_LEVEL = 3 + companion object { + val LOG_LEVEL = 4 + } private val out: PrintStream