Bug 35660 - Ajc11CompilerAdapter should support forking
Summary: Ajc11CompilerAdapter should support forking
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Ant (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Wes Isberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 13:48 EST by Per S Hustad CLA
Modified: 2012-04-03 16:14 EDT (History)
1 user (show)

See Also:


Attachments
Proposal for new org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter (14.33 KB, patch)
2003-03-25 13:53 EST, Per S Hustad CLA
aclement: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per S Hustad CLA 2003-03-25 13:48:16 EST
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.
Comment 1 Per S Hustad CLA 2003-03-25 13:53:06 EST
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.
Comment 2 Wes Isberg CLA 2003-04-09 10:35:16 EDT
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.