mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Handle failed range look ups better.
This commit is contained in:
parent
89d2239209
commit
99444740da
1 changed files with 8 additions and 4 deletions
|
@ -203,10 +203,14 @@ class Aether(localRepo: File, val settings: KobaltSettings, val eventBus: EventB
|
|||
if (KobaltAether.isRangeVersion(artifact.version)) {
|
||||
val request = rangeRequest(artifact)
|
||||
val v = system.resolveVersionRange(session, request)
|
||||
val highestVersion = v.highestVersion.toString()
|
||||
val ar = DefaultArtifact(artifact.groupId, artifact.artifactId, artifact.classifier,
|
||||
artifact.extension, highestVersion)
|
||||
listOf(AetherResult(ar, request.repositories[0]))
|
||||
if (v.highestVersion != null) {
|
||||
val highestVersion = v.highestVersion.toString()
|
||||
val ar = DefaultArtifact(artifact.groupId, artifact.artifactId, artifact.classifier,
|
||||
artifact.extension, highestVersion)
|
||||
listOf(AetherResult(ar, request.repositories[0]))
|
||||
} else {
|
||||
throw KobaltException("Couldn't resolve range artifact " + artifact)
|
||||
}
|
||||
} else {
|
||||
val dependencyRequest = DependencyRequest(collectRequest(artifact, artifactScope), scopeFilter)
|
||||
system.resolveDependencies(session, dependencyRequest).artifactResults.map {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue