Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] What is the latest on "Access restriction" compilation errors

If removing the dependency or adding an OSGi extension bundle is too difficult right now, you can also change the warning levels of the compiler with the following snippet:

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<compilerArgument>-warn:+discouraged,forbidden</compilerArgument>
</configuration>
</plugin>

Works for me :-)

/Tonny


On Wed, Nov 28, 2012 at 7:29 AM, Mickael Istria <mistria@xxxxxxxxxx> wrote:
On 11/27/2012 09:23 PM, Rizzo, Eric wrote:
I've tried searching and reading about other similar problems, but quickly got lost in the weeds of bug reports and discussions about OSGi. I found a reference to a blog post about creating an OSGi Extension Bundle (http://blog.meschberger.ch/2008/10/osgi-bundles-require-classes-from.html) but honestly that seems like a big pain just to get Tycho to compile against a class I know exists in JRE 1.6.
Extensions Bundle are the only good way to go with clean OSGi.
It may seem to be a big pain, but it's not. It's just a matter of putting to fragment on system-bundle and use Export-Package. Just a Tycho "eclipse-plugin" with a MANIFEST.MF.
Moreover your software does not run against Java, it runs against a com.sun.* JRE. It is possible that it fails in other environment or in future releases of JREs (IBM JDK's, JRockit, IcedTea...). So you should consider remocing this dependency to internal JVM packages.

HTH
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user




--

Tonny Madsen

My profiles: LinkedIn Twitter Blogger SlideShare


Back to the top