mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -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)) {
|
if (KobaltAether.isRangeVersion(artifact.version)) {
|
||||||
val request = rangeRequest(artifact)
|
val request = rangeRequest(artifact)
|
||||||
val v = system.resolveVersionRange(session, request)
|
val v = system.resolveVersionRange(session, request)
|
||||||
val highestVersion = v.highestVersion.toString()
|
if (v.highestVersion != null) {
|
||||||
val ar = DefaultArtifact(artifact.groupId, artifact.artifactId, artifact.classifier,
|
val highestVersion = v.highestVersion.toString()
|
||||||
artifact.extension, highestVersion)
|
val ar = DefaultArtifact(artifact.groupId, artifact.artifactId, artifact.classifier,
|
||||||
listOf(AetherResult(ar, request.repositories[0]))
|
artifact.extension, highestVersion)
|
||||||
|
listOf(AetherResult(ar, request.repositories[0]))
|
||||||
|
} else {
|
||||||
|
throw KobaltException("Couldn't resolve range artifact " + artifact)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
val dependencyRequest = DependencyRequest(collectRequest(artifact, artifactScope), scopeFilter)
|
val dependencyRequest = DependencyRequest(collectRequest(artifact, artifactScope), scopeFilter)
|
||||||
system.resolveDependencies(session, dependencyRequest).artifactResults.map {
|
system.resolveDependencies(session, dependencyRequest).artifactResults.map {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue