1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Version fix.

This commit is contained in:
Cedric Beust 2016-02-19 07:35:47 +04:00
parent 1a3fdb776b
commit 9b9a50e7f8
2 changed files with 14 additions and 3 deletions

View file

@ -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

View file

@ -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)