Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Resolution of packages containing "impl" in their names

Cristiano -

If you are trying to OSGi-ify a third-party library (TPL), I've had a lot of success with a "wrapper" jar that contains the raw TPL jar as an embedded member. 

One of the more complex examples is this OSGi bundling for JOGL:

https://github.com/leeca/com.jogamp.jogl/blob/maven-bundle/pom.xml

By tweaking the Export-Package element, it is possible to expose all sort of internal packages.

Let me know if you have any questions.

Thanks
- Lee

On Mon, Dec 21, 2015 at 2:35 AM, De Alti, Cristiano <Cristiano.DeAlti@xxxxxxxxxxxx> wrote:

Hello,

  Il looks like Tycho has problems resolving the imports from bundles exporting packages which contain "impl" in their names.

I understand that importing "impl" or "internal" packages is a bad idea and that other plugins (e.g. maven-bundle-plugin) by default don't export these packages but I'm trying to OSGi-fy an existing third party library and I need to import all of it's packages in another bundle.


Tycho complains (only) on these packages:


Resolution errors:
   Bundle org.eclipse.kura.protocol.zigbee - Missing Constraint: Import-Package: org.bubblecloud.zigbee.api.cluster.impl.api.core; version="2.0.3.SNAPSHOT"
   Bundle org.eclipse.kura.protocol.zigbee - Missing Constraint: Import-Package: org.bubblecloud.zigbee.network.impl; version="2.0.3.SNAPSHOT"


Note that the OSGi-fied library exports the packages in the MANIFEST, for example:


org.bubblecloud.zigbee.network.impl;x-internal:=false;version="2.0.3.SNAPSHOT"


I had to add the "x-internal:=false" to suppress Eclipse "Access restriction" errors.


The above happens with Tycho 0.20 and 0.24.


Is there something else I could try before giving up and embedding the third party jar to the lib/ directory of my bundle?


Is this behavior (filtering "impl" packages) documented anywhere?


Regards,

  Cristiano


_______________________________________________
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