cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
433 stars 60 forks source link

All versions of kobalt-plugin-api are downloaded not just latest #344

Closed ethauvin closed 7 years ago

ethauvin commented 7 years ago

See enclosed Travis log for https://travis-ci.org/ethauvin/kobalt-maven-local

Project uses:


val kobaltDependency = if (dev) "kobalt" else "kobalt-plugin-api"
...
compile("com.beust:$kobaltDependency:")
...
cbeust commented 7 years ago

A simple ./kobaltw --resolve com.beust:kobalt-plugin-api: reproduces the problem.

This is translated into "com.beust:kobalt-plugin-api:(0,]" by Kobalt and then passed to Maven Resolver, so I'm not sure it's a Kobalt bug or even a Maven Resolver bug: maybe it's necessary to download all these .pom files in order to select the highest version.

Also, these are only downloaded the first time and never after that.

I will see if I can get someone from the Maven Resolver team to answer this,

dittert commented 7 years ago

I think it also happens with ./kobaltw --listTemplates.

cbeust commented 7 years ago

I exchanged emails with the Maven Resolver team and they think it's a bug on their part. I need to file an issue at http://maven.apache.org/resolver/issue-tracking.html

Excerpt from my discussions:

It smells the bug :( AFAIR we don't need to download POMs to resolve ranges, we are supposed to do this from our metadata In your case from https://jcenter.bintray.com/com/beust/kobalt-plugin-api/:maven-metadata.xml I don't see why we should download / read all POMs

ethauvin commented 7 years ago

Fixed.