From a4b5b459fed30bf87946b41db0be00cd1cea7e4c Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sun, 8 Nov 2015 21:28:31 -0800 Subject: [PATCH] Scoping. --- src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt b/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt index 028b3486..b18734fb 100644 --- a/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt +++ b/src/main/kotlin/com/beust/kobalt/maven/RepoFinder.kt @@ -73,7 +73,7 @@ public class RepoFinder @Inject constructor(val urlFactory: Kurl.IFactory, val e val mavenId = MavenId(id) val groupId = mavenId.groupId val artifactId = mavenId.artifactId - val version = mavenId.version + if (! mavenId.hasVersion) { val ud = UnversionedDep(groupId, artifactId) val foundVersion = findCorrectVersionRelease(ud.toMetadataXmlPath(false), repoUrl) @@ -83,6 +83,7 @@ public class RepoFinder @Inject constructor(val urlFactory: Kurl.IFactory, val e return RepoResult(repoUrl, false, "") } } else { + val version = mavenId.version if (version!!.contains("SNAPSHOT")) { val dep = SimpleDep(mavenId) val snapshotVersion = findSnapshotVersion(dep.toMetadataXmlPath(false), repoUrl)