Community
Participate
Working Groups
ajc1.1rc1 When using AspectJ in e.g. a CruiseControl environment, there exists a problem where jars on the classpath gets locked and never releases. Normally this is solved by specifying "extJavac" or "fork" in the Ant java task, but ajc 1.1rc1 does not currently support the forking task as documented in the Ant Readme file. I have started implementing a fork mechanism for the Ajc11CompilerAdapter and it would be nice if you could have a look at it.
Created attachment 4344 [details] Proposal for new org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter Note: I have not yet tested the new CompilerAdapter. There is no problem to support a JUnit test if you could give me some hints where to place it.
I just fixed this in the head of the tree. Both AjcTask and the compiler adapter now support forking. Thank you for the patch; it raised the issues again, which prompted me to throw out the whole DefaultCompilerAdapter-based implementation and delegate to AjcTask instead. Small snippets of your code ended up in AjcTask.java. Known limitations: (1) I haven't figured out how to keep javac from doing dependency pruning (which can result in the adapter not being called at all) or the best way to replicate javac source-gathering. (2) forking only uses the Ant VM and only support maxMem, not minMem. (3) argfile-conversion for large command lines is untested. (4) extremely minimal JUnit tests in testsrc/org/aspectj/tools/ant/taskdefs, Ajc11CompilerAdapterTest.java and AjcTest.java updates.