vertx-stack icon indicating copy to clipboard operation
vertx-stack copied to clipboard

Transitive optional dependencies resolution issue

Open vietj opened this issue 7 years ago • 2 comments

It seems that optional=true dependencies that are transitively added force the resolution of the optional dependencies, e.g

vertx-junit5 -> vertx-rx-java2 -> vertx-micrometer-metrics (optional=true)

resolves vertx-micrometer-metrics jar

It can be reproduced by adding vertx-junit5 in the full stack json file and call resolve.

vietj avatar Nov 28 '18 12:11 vietj

I will have a look. Thanks for the reproducer!

cescoffier avatar Nov 30 '18 08:11 cescoffier

Ok, much more tricky than expected. We would need a "graph based resolver" and not the once we are using (tree-based). Maven has one, but right now we depend on Aether.

One solution would be to do the dependency resolution as a maven plugin and not trying to mimic Maven behavior.

anyway, this is going to be a big change, and won't be do-able before 4.0

cescoffier avatar Dec 06 '18 08:12 cescoffier