There are many occasions where the ant targets are the best option for the user to get the correct output. In those cases it is unsafe for the user to launch the ant tasks directly because of the following issues:
- ECJ jar may not be found
- OOM errors may occur since by default all ant tasks use the same JRE as eclipse
- build.<user>.properties may not be configured correctly
If we provide actions for the user (in context menu of project or context menu of build.xml file) then we can provide actions for invoking these same ant targets, but we can do the following
- add the ECJ jar from the SDK /lib directory specifically for this launch
- fork the JVM launch so ant has separate JVM, and set the memory to large amount like 1024m
- make sure that build.<user>.properties is configured correctly.