Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Advice: OSGi'fy jars into target platform or Classpath and included in bundle?

I use maven-bundle-plugin Embed-Dependency feature [1] to "wrap"
thirdpary dependencies in OSGi bundles and pomDependencies=consider [2]
Tycho target platform configuration parameter to use these wrapper
bundles from Tycho builds. See m2e embedded maven runtime, for example [3].

The only real caveat here is that wrapper bundles must be built
separately, before building any tycho project that uses them.


[1] http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
[2] https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts [3] http://git.eclipse.org/c/m2e/m2e-core.git/tree/?id=milestones/1.1/1.1.0.20120505-1126

--
Regards,
Igor

On 12-05-29 4:49 AM, Barrie Treloar wrote:
I have an RCP application that makes use of maven dependencies that
are no OSGi'fied.

Previously I had all the jars in the plugin's lib/ directory courtesy
of maven-dependency-plugin.
The downside of this approach is that every time we go to create a
release we have to manually edit MANIFEST.MF, .classpath and
build.properties to change all -SNAPSHOT versions to released version.
We can then tag a baseline and deploy a release.
And then we upgrade to the next -SNAPSHOT version, modifying the same
files as before.

This is a tedious and error prone process.

I think a better option would be to OSGi'fy these jars (or source ones
already from Orbit or Spring repositories).
But I am left with a few jars that no one else has already OSGi'fied,
plus all our internal ones.

I'm not familiar enough with class path resolution rules in Eclipse,
but I dimly recall that its an all or nothing approach.
I have to make everything OSGi'fied as transitive dependencies need to
get loaded correctly.

I know this is a niche area, as most people are probably writing
Eclipse plugins so they don't have this issue.

Is anyway writing an Eclipse RCP and have given this scenario some
thought and can share any advice?
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top