[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[buckminster-dev] Transient resolve and generated version types

The problem:
When using a provider that finds components that in turn have dependencies to other components, we build a cspec that has dependencies. At present, the Maven provider will set the versionType attributes in such dependencies is set to default, i.e. OSGi. This will sometimes fail since components in a maven repository might use version representations that doesn't comply. The way we resolve that today is to use a CQUERY that contains a version type override for those components but that's far from ideal (the generated CSPEC is still not correct). A better approach would be to somehow control the generation of the version type.


A possible solution:
A provider could be equipped with automatic recognition of version types. We add a method to each version type that answers yes or no to if a version is recognized. Any given version would then be recognized by 1-M types (there will always be one since the string type accepts all representations). In cases where more then 1 version type would recognize a given version, we would consult a table describing version type priority. Highest priority wins.


The table could either be defined on a per provider basis or in a broader scope using properties (scoped by rmap, site, cquery).

I though about extending the version type extension point with a 'defaultPriority' but priority conflicts may arise since we don't maintain a global repository of all version types. Another con is that different users might have different preferences.

Thoughs?

Regards,
Thomas Hallgren