[macker-developer] Patch to help running in a forked JVM under Ant
Brought to you by:
barredijkstra,
melquiades
From: Ross B. <ro...@ce...> - 2003-11-16 05:06:24
|
Hi, Congratulations & many thanks for Macker, it is a useful tool to have! After experimenting with it for a while I'm now integrating it an Ant build environment, and in doing so I've found a couple of issues: 1. Macker slows to a crawl as its memory usage approaches the JVM's max. In other ant tasks (eg. javadoc) this is normally solved by forking off a new JVM with a large maximum memory. While macker supports forking, it doesn't provide a way to set the max memory for the new JVM. (I realise I can increase the memory of the original Ant JVM using something like ANT_OPTS=-Xmx256M, but I prefer to keep the Ant environment as standard as possible: the less developers have to alter the better) 2. When forking a new JVM, the macker ant task adds the name of every class file as an argument to the new process. This fails with a largish number of classes, presumably due to the command line being too long. Attached is a patch that aims to solve these issues by doing the following simple things: a. Adding an optional 'maxmemory' attribute to the macker ant task so that the max memory of the forked JVM can be specified. b. Adding support for an indirect input file to macker. A command line argument of the form '@file' means that each line in 'file' identifies a class file to process. c. Updating the macker ant task so that when forking a new JVM it passes the list of class files via a temporary @file, rather than listing them all on the command line. The patch was made against the CVS sources as at Sun Nov 16 04:44:14 UTC 2003, using 'cvs diff -b -c'. Please let me know if I should submit the proposed changes in some other way. Regards, Ross Burnett <ro...@ce...> |