Improve variant matching error messages
Error messages prove to be difficult to interpret from a user point of
view. This commit tries to improve the situation by doing a couple of
1. describing more clearly what the consumer is asking for. This includes,
when possible (currently only in the Java ecosystem), interpreting the
consumer attributes as a human-readable description, instead of a raw
list of attributes.
2. giving more context when possible. In particular, sometimes we fail
with an ambiguous variant error selection, but we only list the remaining
candidates, not listing the ones which were actually discarded during
selection. This proved to be particularly complex to debug from various
users (plugin authors and end-users).
Introduce a `JAVA_API_JARS` usage
This commit introduces a new `JAVA_API_JARS` usage, mirror
to the `JAVA_RUNTIME_JARS` usage. This is both for consistency,
and to make sure that the `JAVA_API` and `JAVA_RUNTIME` usages
are limited to cases where the consumer doesn't care, or when
a producer doesn't have a more specific usage to provide.
This is, for example, the case for Java platforms. It's worth
noting than in case a producer mixes both "generic" usages
and "specific" usages, selection is likely to produce unexpected
results, because of disambiguation rules.
The Java disambiguation rule has been simplified and now
supports more cases.
06 Feb 19 e3ec2a0361fe7facb113d2b6355b3b59a56d17de