Community
Participate
Working Groups
The PDE Create Ant build file option and the <eclipse.buildScript> ant task both create a build file with <property name="javacSource" value="1.3"/> <property name="javacTarget" value="1.2"/> I want to override these values so they are <property name="javacSource" value="1.5"/> <property name="javacTarget" value="1.5"/> I have placed these values in teh build.properties file and they seem to be ignored.
*** Bug 112419 has been marked as a duplicate of this bug. ***
We are currently working on a support that will derive those values from the Bundle-RequireExecutionEnvironment header provided in bundle manifests and that will also let people override that value in the build.properties of each plugin. Stay tuned here, it should be ready for next week I build.
*** This bug has been marked as a duplicate of 109510 ***
Moving to JDT Core for comment. If I hard-code the source and target values in the Ant javac call to 1.5, I get the following error: "Compliance level '1.4' is incompatible with source level '1.5'. A compliance level '1.5' or better is required" The debug output below does not show source or target as compiler args and it includes the 1.4 java runtime libraries in the classpath. [javac] Using JDT compiler FileSet: Setup scanner in dir /builds/eclipsebuilder200510171607/jdk/linuxppc/IBMJava2-ppc- 142/jre/lib/ext with patternSet{ includes: [*] excludes: [] } [javac] Compilation arguments: [javac] '-noExit' [javac] '-bootclasspath' [javac] '/builds/eclipsebuilder200510171607/eclipseInternalBuildTools/jdks/jdk1 .5.0_03/jre/lib/rt.jar' [javac] '-classpath' [javac] '/builds/eclipsebuilder200510171607/jdk/linuxppc/IBMJava2-ppc- 142/jre/lib/ext/dumpfmt.jar:/builds/eclipsebuilder200510171607/jdk/linuxppc/IBM Java2-ppc- 142/jre/lib/ext/gskikm.jar:/builds/eclipsebuilder200510171607/jdk/linuxppc/IBMJ ava2-ppc- 142/jre/lib/ext/ibmjcefips.jar:/builds/eclipsebuilder200510171607/jdk/linuxppc/ IBMJava2-ppc- 142/jre/lib/ext/ibmjceprovider.jar:/builds/eclipsebuilder200510171607/jdk/linux ppc/IBMJava2-ppc- 142/jre/lib/ext/ibmjsseprovider2.jar:/builds/eclipsebuilder200510171607/jdk/lin uxppc/IBMJava2-ppc- 142/jre/lib/ext/ibmpkcs11impl.jar:/builds/eclipsebuilder200510171607/jdk/linuxp pc/IBMJava2-ppc- 142/jre/lib/ext/indicim.jar:/builds/eclipsebuilder200510171607/jdk/linuxppc/IBM Java2-ppc- 142/jre/lib/ext/jaccess.jar:/builds/eclipsebuilder200510171607/jdk/linuxppc/IBM Java2-ppc- 142/jre/lib/ext/ldapsec.jar:/builds/eclipsebuilder200510171607/jdk/linuxppc/IBM Java2-ppc- 142/jre/lib/ext/oldcertpath.jar:/builds/eclipsebuilder200510171607/src/plugins/ org.eclipse.core.filesystem/temp.folder/@dot.bin:/builds/eclipsebuilder20051017 1607/src/plugins/org.eclipse.core.runtime/@dot:/builds/eclipsebuilder2005101716 07/src/plugins/org.eclipse.osgi/@dot:/builds/eclipsebuilder200510171607/src/plu gins/org.eclipse.core.filesystem/src' [javac] '-d' [javac] '/builds/eclipsebuilder200510171607/src/plugins/org.eclipse.core.filesy stem/temp.folder/@dot.bin' [javac] '-log' [javac] '/builds/eclipsebuilder200510171607/src/plugins/org.eclipse.core.filesy stem/temp.folder/@dot.bin.log' [javac] '-proceedOnError' [javac] '-enableJavadoc' [javac] '-encoding' [javac] 'ISO-8859-1' [javac]
I used 3.2M2.
The problem comes from the fact that the runtime used to run Ant is still 1.4. So we end up inferring a default compliance in the javac adapter to compliance 1.4 (based on the runtime). Then we pass the source and target levels and in the batch we validate these settings. In this case they don't match so we stop. One workaround would be to run on a 1.5 JRE. This would fix this issue. One fix we can provide is not to infer a compliance based on the runtime if a source target has been provided. If a source target is provided, it should imply the corresponding compliance if none is specified.
Unfortunately, we don't have a readily available 1.5 JDK release for our Linux PPC build machine at this time.
I'll check what we can do in order to fix this case (running on top of 1.4, but providing 1.5 libraries and using 1.5 source and target).
Fixed and released in HEAD. If the target and source are specified, we should use them as much as possible to set the compliance. It is only if source is 1.3 that we need to check the runtime to know if we should set the compliance to 1.4 or 1.3. Otherwise: source 1.4 => compliance 1.4 source 1.5 => compliance 1.5 Fixed and released in HEAD. No regression tests, bu Sonia checked that this fixed the problem. Thanks Sonia for your help.
Only the ant adapter is affected by this fix.
Already verified for 3.2 M3...