Community
Participate
Working Groups
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.
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.
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.
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.
*** Bug 112418 has been marked as a duplicate of this bug. ***
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.
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.
Thanks, the patch works for me.
Patch released.