Community
Participate
Working Groups
Hello PDE development team, While generating a build file from the context menu "PDE Tools -> Create Ant Build File" on "plugin.xml" in the package explorer, the generator does not take into account the settings "Source Compatibily" and "Generated .class files compatibility" set in "Plugin Development -> Build Options" preference page. Quote from Clemens Drews: "Hi, The build.xml file needed for exporting (read creating) a plugin seems to be created without looking at the Java Version preferences. You can reproduce this bug when creating a Plugin (say the Hello World Plugin example), insert an assertion anywhere in the sourcecode. Doing this you must switch the compiler compatibility to 1.4. If you do so either in the project preferences or in the eclipse global preferences and then create the build.xml file (right mouse click on plugin.xml->create build.xml) the resulting code contains the line on top: <property name="javacSource" value="1.3"/> <property name="javacTarget" value="1.1"/> which should be 1.4 both times. Is there a workaround? Am I missing something. So far I generated those scripts and the set custom=true in the build.properties then edited the build.xml to reflect the correct setting. Is there a better way? This bug was present in verion 3.0 M3 and now in M4. - Clemens" I can confirm that this bug is still present, at least in 3.0 M3, M4, M5 and M6 (On Mac OS X for my side). Another workaround is to add the two properties into the "Ant -> Runtime - Properties" preference tab. And, for each "build.xml" settings, check the "Use global properties as specified in the Ant runtime preference" inside the "Properties" tab. It's awkward because when a site is built, ALL its referenced plugins have their "build.xml" file regenerated with a wrong "javacSource" and "javacTarget" property values ... Frederic Fays Extra info: Related news threads: http://dev.eclipse.org/newslists/news.eclipse.platform/msg07876.html (Clemens Drews's original post) http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg04822.html Related bug reports: https://bugs.eclipse.org/bugs/show_bug.cgi?id=44821 https://bugs.eclipse.org/bugs/show_bug.cgi?id=42393
*** This bug has been marked as a duplicate of 55353 ***