Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 38067 - build.xml (ant) javac target does not conform to Compiler compliance level.
Summary: build.xml (ant) javac target does not conform to Compiler compliance level.
Status: RESOLVED DUPLICATE of bug 55353
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 2.1   Edit
Hardware: Macintosh All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-23 17:13 EDT by Christian LEMER CLA
Modified: 2004-04-29 09:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian LEMER CLA 2003-05-23 17:13:51 EDT
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.
Comment 1 Olivier Thomann CLA 2003-06-11 14:19:34 EDT
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.
Comment 2 Pascal Rapicault CLA 2003-07-14 14:26:31 EDT
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?
Comment 3 Christian LEMER CLA 2003-07-22 02:24:49 EDT
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.
Comment 4 Pascal Rapicault CLA 2003-07-22 08:27:11 EDT
Chris, 
Could you please give us more detail about your scenario and look if the M2 
drop suits your needs. Thank you.
Comment 5 Christian LEMER CLA 2003-07-23 02:30:20 EDT
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.
Comment 6 Pascal Rapicault CLA 2003-07-23 16:29:22 EDT
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.
Comment 7 Wassim Melhem CLA 2003-07-23 16:36:17 EDT
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.
Comment 8 Wassim Melhem CLA 2003-08-16 19:22:46 EDT
resolving...
Comment 9 Peter Schaich CLA 2004-04-29 03:49:57 EDT
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?
Comment 10 Wassim Melhem CLA 2004-04-29 09:20:33 EDT
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.
Comment 11 Pascal Rapicault CLA 2004-04-29 09:55:55 EDT

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