I know that there has been several postings, either here or on the Eclipse mailing list, with problems building XDoclet in Eclipse. I have gotten it to work through certain sequences. I believe that Eclipse has some problems with ANT 1.5 that is causing the problem.

Eclipse Configuration:

- Before starting eclipse, set your JAVA_HOME environment variable to point to you 1.4 home directory. (If you set it in the installed JRE or the compiler options to 1.4 in Eclipse, and the env. var. is set to 1.3, ant will use 1.3)
- In Eclipse goto the windows>preference>external tools>ant, and remove the four ant 1.4 jar's (ant.jar, jakarta-ant-1.4.1-optional.jar, xmlParserAPIs.jar and xeresImpl.jar) and add the four jars from the <ant1.5 home>/lib directory. (PLEASE NOTE THAT ECLIPSE F2, THE ANT CLASSPATH SETTING MUST BE REPEATED ON EVERY RESTART OF ECLIPSE. I BELIEVE THAT ECLIPSE F3 WILL FIX THIS)

After Eclipse configuration, this is the only way to get XDoclet to compile:

Activate Eclipse Ant interface and run each target (clean, core, modules, samples, docs, and dist) by themselves (ie. do clean, when finished, do code, when finished do modules and so on).
If you try to select clean as #1 then core as #2 and module as #3 so on to dist as #6, and then click on finish, the build will fail, the same for selecting dist to run and build everything based on the depends.

This problem seems to be with Eclipse, when I try to build all targets in one click, it seems that the Eclipse ANT plugin does not release ant resources after (core,modules,samples,docs, and dist targets), this can be seen by running clean and then running core and then running clean again, the clean target will fail the second time because it can't delete the core jar because when the core target was ran, the process did not complete by releasing the ant, therefore ant still is holding the jar file and the new ant run can't delete it. After running (core,modules,samples,docs, and dist targets)  the output Build Successful is not displayed, so this leads me to think that the ant classloader in Eclipse is having problems with 1.5 since the build works fine from command line.

I will post this also on the Eclipse list to see if there is any know issue with Ant 1.5 and Eclipse.



Reply via email to