This question requires a little background ... In my company, we are creating a set of PDF and HTML files. A very large set. The current build process (which I developed, in a hurry) is a Perl script that reads a set of files, where each file contains a new ant command to execute.
It is created horribly.
Now I'm trying to move the whole project to using ant for most tasks. Within the framework of the object, I can create a list of files that need to be created, both PDF and HTML. However, when I call the ant command to build each file, after about three builds (say five), the whole process crashes with an OutOfMemory error. In addition, my buildlog.xml ends with something like 20 megabytes - it combines each output of the ant command into one giant log, because it is called from the same target. With an earlier Perl solution, I was able to get the buildlog.xml file for each ant command - just save and rename buildlog to another.
Even if I set the dimensions to w40> or java heaps in my user.properties, I will still fail with OOM. I wonder if the appropriate solution for calling <exec> suitable for running a script that executes some of what I described and what I want: namely, to call ant, rename buildlog and die - theoretically allocating and freeing space is better than one "giant" call ant. It bothers me that I am going to lead another "hacker" solution to a problem that is clearly defined and can be completely limited by ant. Again, <exec> exists for some reason, so shouldn't I use it badly?
source share