Skip to main content

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

If you’re developing a plug-in that must work in multiple versions of Eclipse, and you require something like guava 20, which is not available in older versions of the Eclipse RCP, then do you must have the guava version 20 plug-in available for testing, right?  In that case, can you just set up your target platforms so that they exclude the guava plug-in that comes from Eclipse Mars?  Remove it from the bundle, or change the TP definition in Eclipse so that it’s not there.  

Then you’d just need to do that across all of your supported target platforms and for all third-party dependencies that you need to control.  


On 11/13/17, 4:36 PM, "tycho-user-bounces@xxxxxxxxxxx on behalf of Brian de Alwis" <tycho-user-bounces@xxxxxxxxxxx on behalf of briandealwis@xxxxxxxxx> wrote:

    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…
    tycho-user mailing list
    To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top