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

Better error handling.

This commit is contained in:
Cedric Beust 2016-03-27 09:46:34 -07:00
parent 4cf010f7e0
commit 391df0c4a3

View file

@ -94,7 +94,7 @@ class Aether(val localRepo: File) {
val newArtifact = DefaultArtifact(artifact.groupId, artifact.artifactId, artifact.extension,
resolved.highestVersion.toString())
val artifactResult = resolve(newArtifact)
if (artifactResult != null) {
if (artifactResult != null && artifactResult.size > 0) {
return artifactResult[0]
} else {
throw KobaltException("Couldn't find latest artifact for $group:$artifactId")