Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to ensure that "import-package" results in getting packages only from bundles specified in "require-bundle"?

HI David,

Have you had any luck simply making a proper bundle with the version of ANTLR you require following the recipe in orbit:


Jonah Graham
Kichwa Coders Ltd.

On 4 May 2016 at 00:30, David M. Karr <davidmichaelkarr@xxxxxxxxx> wrote:
I have an Eclipse plugin codebase that uses an ANTLR parser. One (perhaps two) of the several plugins references classes in the antlr packages.

I wasn't able to find the required ANTLR version in a p2 repo, so I have one plugin whose only purpose is to use the "maven-dependency-plugin" to specify the dependencies I need to copy, and I have "build-classpath" entries in the manifest to point to the downloaded jars.  I then set this plugin as a dependency of the other plugins that require the ANTLR classes, along with "import-package" to specify the antlr packages required by the plugin.

This seems conceptually correct, but what I'm finding is that if I do a (say) "require-bundle" of bundle "foo" that defines the "" package, along with an "import-package" of "", it's entirely possible that if some other bundle in the Eclipse OSGi runtime container exports the "" package, I could very well get the classes from that other bundle, instead of the bundle I specifically required.

Specifically, I'm finding that the "checkstyle" bundle apparently uses ANTLR and actually exports those packages (for what reason I can't imagine).  When the bundle in my application ends up randomly getting those classes from the checkstyle bundle, I end up with "linkage error" fatal errors.

So, is there some way I can specify in my plugin manifest that when I say "import-package" for "", I can specify that I ONLY want to get that package from a specific bundle?
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top