|Re: [tycho-user] How to ensure that "import-package" results in getting packages only from bundles specified in "require-bundle"?|
On 05/04/2016 02:24 PM, Tom Bryan (tombry) wrote:
On 5/4/16, 5:21 PM, "tycho-user-bounces@xxxxxxxxxxx on behalf of David M. Karr" <tycho-user-bounces@xxxxxxxxxxx on behalf of davidmichaelkarr@xxxxxxxxx> wrote:On 05/04/2016 01:58 PM, Tom Bryan (tombry) wrote:Require-Bundle and Import-Package serve the same purpose in different ways. Require-Bundle specifies that the current plug-in depends on those specific bundles. At runtime, if it doesn't find those bundles, it will fail to load. Eclipse makes those bundles (and any of their exported packages) available to your plug-in.I this this is telling me that I really have no choice but to directly embed the antlr jar (using "maven-dependency-plugin") into each plugin that requires those classes (fortunately, it does appear that only one of my plugins requires those classes). I am assuming that if a class in a bundle is looking for a class, if it finds it in the same bundle (albeit referenced by "Build-Classpath"), it will not attempt to resolve those classes in any other bundle? Version constraints won't help me, as the checkstyle bundle is packaging the same version of antlr that I need.No, in that case, just remove the Import-Package statements for antlr. Specify your own bundle that provides antlr using Require-Bundle, and I think you should be fine. (My project does something similar with other third party libraries. I has never been a problem for our RCP.)
All this will say is that I require this bundle. It's not going to specify that the resolution for the antlr classes will get them from that bundle. I don't know why this happens, but we've been seeing "Linkage Error" when Eclipse randomly decided to get these classes from the checkstyle plugin (again, which I'm not specifying a dependency for). What's even more annoying is that I can't make this happen on demand, but once the workspace gets into that state, it will always happen, until I uninstall the plugin.
---Tom _______________________________________________ tycho-user mailing list tycho-user@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user
Back to the top