Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Enforcing package version constraints

We're trying to use `Import-Package` in our bundles.  PDE's quick-fixes for adding an import-package helpfully provides a `version` constraint where possible, but it uses the lowest version available in the target platform.  So when developing against a TP for Eclipse Mars, where m2eclipse pulls in Guava 15, all* packages are added with version "15.0.0".  Since we use Guava 20, we have to remember to change any such version constraints be "[20,21)".  Such is life.

Except I'm old and frequently forget to change these package versions and so would like some way to catch these uses at build time.  They aren't caught by the Maven dependency plugin's enforcer as Tycho/p2 resolves the dependencies and selects Guava 20 for the reactor.

Anybody know of any solutions?  I suppose even a grep-for-pattern would work (e.g., `*;version="15.0.0"` would work for this particular case); I wonder if ant has something…


Back to the top