Bug 109510 - need support to set JRE level for each plugin
Summary: need support to set JRE level for each plugin
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M3   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-14 11:51 EDT by Jeff McAffer CLA
Modified: 2005-10-19 17:58 EDT (History)
6 users (show)

See Also:


Attachments
patch (2.79 KB, patch)
2005-10-19 16:46 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2005-09-14 11:51:18 EDT
We are going to add markup in each plugin to note the Required-
ExecutionEnvironment (e.g., 1.4, 1.5, Foundation, ...).  This information can 
be used to control the compiler settings and filter the classpath.

PDE Build needs to gather this info from the manifest.mf and perhaps some 
source settings from build.properties and set the appropriate command line 
args.
Comment 1 Philipe Mulet CLA 2005-10-06 04:18:45 EDT
When flipping compiler settings, you should mimic what JDT/UI is doing in the
preference page. I think it toggles 5 settings at once. CC'ing Dirk.
Comment 2 Pascal Rapicault CLA 2005-10-17 12:21:34 EDT
Another patch from Andrew released in HEAD.
The compiler settings and the bootclasspath are now derived from the osgi
Bundle-RequiredExecutionEnvironment header.

New defaults for the bootclasspath have been added to the template build.properties.
Comment 3 Sonia Dimitrov CLA 2005-10-17 16:41:58 EDT
I ran a small succesfull test of this in our headless build process.  I used 
eclipse 3.2M2 and replaced org.eclipse.osgi and org.eclipse.pde.build 
plugins.  I will start planning the changes required in the releng build 
mechanism to fully accomodate this fix.
Comment 4 Pascal Rapicault CLA 2005-10-18 09:40:42 EDT
*** Bug 112418 has been marked as a duplicate of this bug. ***
Comment 5 Sonia Dimitrov CLA 2005-10-19 11:33:35 EDT
Reopening, this is not working in N20051019.  

To reproduce:

1.  Check out org.eclipse.compare and org.eclipse.core.filesystem
2.  Add Bundle-RequiredExecutionEnvironment: J2SE-5.0 to the 
org.eclipse.core.filesystem manifest
3.  Select "PDE Tools-> create Ant build file" from the context menu of the 
org.eclipse.compare manifest.
4.  Observe error dialog "Unable to find element: org.eclipse.compare"
5.  Remove the entry added in step 2 above, and repeat step 3.  The build.xml 
creation succeeds.
Comment 6 Andrew Niefer CLA 2005-10-19 16:46:38 EDT
Created attachment 28484 [details]
patch

The problem comes from PDE-Build using "J2SE-5.0" while the OSGi plugin is
using "J2SE-1.5".  The plugin was failing to resolve since 5.0 > 1.5.

The attached patch changes PDE-Build to use 1.5 in agreement with osgi.

This patch also changes the build.properties template so that you uncomment the
environments available.  This better matches the pattern of conditional checks
in the generated build.xml.
Comment 7 Sonia Dimitrov CLA 2005-10-19 16:55:54 EDT
Thanks, the patch works for me.
Comment 8 Pascal Rapicault CLA 2005-10-19 17:58:08 EDT
Patch released.