Community
Participate
Working Groups
Event if Compiler compliance level is set to 1.4, the javac target of the build.xml file does contains the source="1.4" attribute. A manual fix solves the problem temporarily for local build but does not solve the problem of site build. It seems that site build in not using the build.xml (manually fixed) because event if we fix the build.xml files by adding the source="1.4" attribute by hand, the compilation error still occur when building the site for web update.
Move to PDE/UI as they generate the build.xml file. This settings are per project. There is API in JDT/Core to get the proper options to check.
The settings set in the UI are not given to the pde.build. If you want to override that on a build basis, you can set the javacSource ant property to 1.4. The value of this property is passed to the source property of the ant javac task. Wassim, do you think it is possible for you to write those settings in the build.properties so the pde build can use those values where required?
Sorry but I didn't understood that the question was targeted to me. I thought it was an internal comment... Of course I don't want to put it in the build.xml file by myself. I do it for the moment but it's has several drawbacks: First, the build.xml file is generated manually... so if I want to regenerate it, I have to patch the file again. Secondly, the automatic build process that regenerates the update site from several plugins does not read the build.xml files patched... so the current bug prevents me to use the automatic procedure. I have to make the full build process manuelle. And finally, I think it's really a bug. The build.xml file does not reflect the values that are selected in the preference. I hope you'll fix this problem as soon as possible because it's really annoying to have to fix build.xml by hand and make the entire build procedure by hand! Regards, Chris.
Chris, Could you please give us more detail about your scenario and look if the M2 drop suits your needs. Thank you.
Do you really need a detaild example? I could provide you one if you needed but I tough the statement was very simple. In the preferences/Java/Compiler tab JDK Compliance, the Compile compliance level could be set to Java 1.4 (I also check the defalut compliance settings). With this configuration I could compile files with 1.4 specific features (i.e. asserts). But when I generate the build.xml file, the javac target is not correct. source="1.4" is missing! I test with M2 and source="1.4" is still missing. If I try to generate the jar file with and, it fails! When I fix this by hand (what I don't want to do forever of course), it's ok and I could generate the jar file... but I think that the fact the Java 1.4 is selected in the preferences should result in a compliante build.xml file too... Sorry if my english is not good, do not hesitate asking me if it's not clear. Regards, Chris.
The PDE-UI does not use the information set into the compiler to preferences. However when you run the ANT script properties are set by default and you can override them.
Christian, use the Plug-in Development -> Build Properties preference page to set compiler options for building plug-ins. Although the build.xml script that gets generated does not reflect the settings on this preference page, when the script runs, the values in the preference page override what's in the script, which is what you want.
resolving...
I just checked this in 2.1.1 and 2.1.3 and it still does not work for me (in fact, I didn't realize any difference between 2.1.1 and 2.1.3). Was it really fixed? In which version?
The references made in comment #7 all apply to the 3.0 stream, not to the 2.x streams. Pascal, I believe the user is probably looking for a solution as recommended in bug 55353.
*** This bug has been marked as a duplicate of 55353 ***