Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 49338 - PDE build.xml generator ignores "Source Compatibily" and "Generated .class files compatibility" settings
Summary: PDE build.xml generator ignores "Source Compatibily" and "Generated .class fi...
Status: RESOLVED DUPLICATE of bug 55353
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-24 03:26 EST by Frederic Fays CLA
Modified: 2004-03-22 22:03 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fays CLA 2003-12-24 03:26:56 EST
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
Comment 1 Pascal Rapicault CLA 2004-03-22 22:03:42 EST

*** This bug has been marked as a duplicate of 55353 ***