I have automatically generated Ant build scripts which I have exported from Weblogic 10gR3 in order to run an automated build on a remote machine. The machine I test on is running JRockit Java 1.6.0_05 and Ant 1.8.1. The project is developed in Workshop and relies heavily on Apache Beehive and NetUI.
The script falls over when it reaches an Apt task in the generated scripts, and complains that Apt requires Java 1.5 or above. Obviously the task isn't fully compatible with Java 1.6. I have tried to convert the <apt> tags to <javac> tags, as Java 1.6 can process annotations in the compiler, effectively removing the need for a separate Apt task. However, this causes problems later on in the build as new source files that are generated by the Apt task don't get generated when using javac. I've also tried converting the project code from Java 1.6 to 1.5, but even after a full rebuild of project structure, copying of code and recompiling with a 1.5 compiler I still get errors during the build complaining about bad class file version numbers.
Is there any accepted way of either getting the Apt task to play nicely with Java 1.6 or failing that a way to remove the Apt task and still get the same code-generation-from-annotations functionality using different tasks?
Hi Kal, thanks for your reply.
Yes, I've tried with Sun JDK 1.6.0_23 on Eclipse, the build runs fine from inside Eclipse. But when I try to use that JDK with the exported Ant script I still get the same error as with the JRockit JDK - that Apt requires Java 1.5+
Hi again - just an update.
I found a way around this problem, from this thread: 10.3 build files and Hudson
All I had to do was use the default version of Ant that ships with WebLogic, found at (bea_home)/modules/org.apache.ant_1.6.5 and the build ran fine with the orginal <apt> tasks in place.
Thanks to Kal and Konstantin for their help and advice.