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

Don't return snapshots for versionless id's.

This commit is contained in:
Cedric Beust 2016-03-21 22:00:33 +04:00
parent 8ca320bedc
commit 3df9e4ad1c

View file

@ -115,7 +115,8 @@ class RepoFinder @Inject constructor(val executors: KobaltExecutors, val localRe
val isLocal = repoUrl.startsWith(FileDependency.PREFIX_FILE)
val path = ud.toMetadataXmlPath(false, isLocal)
val foundVersion = findCorrectVersionRelease(path, repoUrl)
if (foundVersion != null) {
// When looking up a versionless id, never return a SNAPSHOT
if (foundVersion != null && ! foundVersion.contains("SNAPSHOT")) {
return listOf(RepoResult(repo, Version.of(foundVersion), repoUrl + path))
} else {
return listOf(RepoResult(repo))