Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] how to build bundles that depends on classes from RT.jar/Classes.jar ?

For people that could have the same problem...

Reading this articles I could found one solution that works with tycho, to create a system bundle extension:
 http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi/
http://blog.meschberger.ch/2008/10/osgi-bundles-require-classes-from.html

To use it with Tycho I had to create a new plugin fragment project, setup the manifest as below, add a pom and add it to the parent modules:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Dependencies
Bundle-SymbolicName: com.c4biz.wsht.internal.dependencies
Bundle-Version: 0.0.1.qualifier
Bundle-Vendor: C4BIZ
Fragment-Host: org.eclipse.osgi;bundle-version="3.7.0";extension:=framework
Export-Package: sun.misc,com.sun.tools.xjc,sun.reflect

cheers

Cristiano


On 25/07/11 12:32, Cristiano Gavião wrote:
Hi people,

I'm getting some problem using a dependency bundle (binary) on my project that has dependency on sun.misc package. Tycho gives this error:

Missing requirement: com.thoughtworks.xstream 1.3.1 requires 'package sun.misc 0.0.0' but it could not be found

I know that this class is part of, in case of macos, /System/Library/Frameworks/JavaVM.framework/Home/bundle/Classes/classes.jar

But how can I use it ?

I've tried to setup a profile with this dependency but didn't work:

<dependency>
<groupId>com.sun</groupId>
<artifactId>classes</artifactId>
<systemPath>${java.location}</systemPath>
<version>1.6</version>
<scope>system</scope>
</dependency>

Could someone give me a help?

thanks

Cristiano



Back to the top