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,

Try this:

1- git clone https://git.eclipse.org/r/orbit/orbit-recipes
2- cd to antlr/org.antlr.runtime_4.5.1
3- run mvn clean package

You now have a proper OSGi bundle in the target directory.

See the README for more details, in your clone root or here
https://git.eclipse.org/c/orbit/orbit-recipes.git/tree/README.md

Jonah
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 4 May 2016 at 15:10, David M. Karr <davidmichaelkarr@xxxxxxxxx> wrote:
> I obviously need to learn more about this.  The latest version in a public
> Orbit repo is older than 4.5.1, and I need 4.5.1.  I don't understand how to
> use what you're showing me here.
>
>
> On 05/03/2016 11:45 PM, Jonah Graham wrote:
>
> HI David,
>
> Have you had any luck simply making a proper bundle with the version of
> ANTLR you require following the recipe in orbit:
>
> https://git.eclipse.org/c/orbit/orbit-recipes.git/tree/antlr/org.antlr.runtime_4.5.1
>
> Jonah
>
> ~~~
> Jonah Graham
> Kichwa Coders Ltd.
> www.kichwacoders.com
>
> 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 "com.foo" package,
>> along with an "import-package" of "com.foo", it's entirely possible that if
>> some other bundle in the Eclipse OSGi runtime container exports the
>> "com.foo" 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 "com.foo", I can specify that I ONLY want to get that
>> package from a specific bundle?
>> _______________________________________________
>> 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
>
>
>
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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