Ant compiling some classes as version 50 (1.6)

Pascal Robert <[email protected]> Tue, 28 Dec 2010 09:05:50 -0500
Newsgroups gmane.comp.web.webobjects.woproject.devel
Message-ID <[email protected]>
I had to deploy a app last Friday on our XServe with 10.4.11 (so no Java 6 for you). Eclipse is set to compile with 1.5. compliance level and I was able to deploy other apps on that server in the past while having only Java 6. But not for that app, it won't start on the server because of the good old "bad version number" error. So I decompress the .jar and found out that two of the ~60 classes from the app are compiled as version 50 (1.6) but the other classes are version 49 (1.5)! Same thing for a framework that is embedded into the app, 3 classes out of ~40 are built with version 50.

I looked at the build that the incremental builder in Eclipse do, and it's all version 49. So the culprit is Ant... But I don't know how to fix that. I tried to search for it in Google but either I'm not searching with the correct terms or I didn't find anything (only found references of when all classes are built with the wrong version).

Any ideas?