Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364076

Summary: compiler-plugin does not respect execution environment system packages
Product: z_Archived Reporter: Igor Fedorenko <igor>
Component: TychoAssignee: Igor Fedorenko <igor>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jan.sievers
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Igor Fedorenko CLA 2011-11-17 14:32:02 EST
Unlike JDT compiler inside IDE ("JRE System Library" classpath container, to be precise), tycho compiler plugin does not respect org.osgi.framework.system.packages property and assumes all packages from bootclasspath are fully accessible. This results in compilation errors due to classpath collision between project's own classes and classes that happen to be available from bootclasspath. I'll push the fix along with a unit test shortly.
Comment 1 Jan Sievers CLA 2011-11-18 03:45:30 EST
is this related to bug 362966 ?
Comment 2 Igor Fedorenko CLA 2011-11-18 08:01:14 EST
(In reply to comment #1)
> is this related to bug 362966 ?

Yes, it is related.

On some platforms, like OSX, it is not easily possible to install additional Java versions, so managing bootclasspath access rules is the only way to make sure build does not accidentally use classes that would not be available at runtime.

The other aspect of this is the discrepancy between classpath visibility inside IDE and on command line build. In this particular case I believe IDE provided more sensible behaviour and it makes sense to change Tycho to match it.
Comment 3 Igor Fedorenko CLA 2011-11-19 22:33:47 EST
Implemented. Only packages explicitly listed in bundle runtime execution environment profile will be accessible from JDK libraries(s).

http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=d5faf8f7be6b98c771a92476554e258beb9573da