From 3a2ba61c6e4db333d08883f3d05d539b7ed68124 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Wed, 20 Jul 2016 01:17:01 -0800 Subject: [PATCH] Fix the extractHost() missing method exception. Fixes https://github.com/cbeust/kobalt/issues/287 --- .../main/kotlin/com/beust/kobalt/maven/DependencyManager.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 dce1315b..37d0a126 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 @@ -93,7 +93,11 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val result.addAll(runClasspathContributors(project, context)) result.addAll(dependentProjectDependencies(project, context)) - 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 + // but with a different version + val reordered = reorderDependencies(result) + return reordered } private fun runClasspathContributors(project: Project?, context: KobaltContext) :