diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/ResolveDependency.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/ResolveDependency.kt index 73a8c8e4..32d4337a 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/ResolveDependency.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/ResolveDependency.kt @@ -30,8 +30,13 @@ class ResolveDependency @Inject constructor(val repoFinder: RepoFinder, val repoResult = repoFinder.findCorrectRepo(id) val indent = -1 - val mavenId = MavenId.create(id) - val originalDep = mdFactory.create(mavenId, executors.dependencyExecutor, true, true) + + val originalId = MavenId.create(id) + val mavenId = MavenId.create(originalId.groupId, originalId.artifactId, originalId.packaging, + originalId.version) + + val originalDep = mdFactory.create(mavenId, executors.dependencyExecutor, + downloadSources = true, downloadJavadocs = true) val packaging = if (mavenId.packaging != null) "@" + mavenId.packaging else "" // We want to display the dependencies of the id we found, not the one we queries diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/SimpleDep.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/SimpleDep.kt index 6f0e25ae..5d68fac0 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/SimpleDep.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/maven/SimpleDep.kt @@ -9,7 +9,13 @@ open class SimpleDep(open val mavenId: MavenId) : UnversionedDep(mavenId.groupId } } - val version: String get() = mavenId.version!! + val version: String get() = + if (mavenId.version == null) { + "" +// throw AssertionError("Version should have been resolved: ${mavenId.toId}") + } else { + mavenId.version!! + } private fun toFile(version: Version, suffix: String): String { val dir = toDirectory(version.version, false, trailingSlash = false)