I cannot include older ant script (due to corporate security policy), besides, after neutering it would be useless to you, (I think).
Ok, some success with javadoc and junit, but the tasklist and linkcheck are still issues.
junit:
setting the folling in the project.properties helps with junit.
maven.junit.jvmargs = -Xmx1024m
maven.junit.fork = true
javadoc:
Since according to the ant manual at http://ant.apache.org/manual/CoreTasks/javadoc.html, it states ...
"NOTE: since javadoc calls System.exit(), javadoc cannot be run inside the same VM as ant without breaking functionality. For this reason, this task always forks the VM. This overhead is not significant since javadoc is normally a heavy application and will be called infrequently."
Using that we had to hack the ${HOME}/.maven/plugins/maven-javadoc-plugin-1.3/plugin.jelly
file to accept the "maxmemory" attribute.
example:
<ant:javadoc
packagenames="${pom.package}.*"
maxmemory="${maven.javadoc.maxmemory}"
destdir="${maven.javadoc.destdir}"
author="${maven.javadoc.author}"
public="${maven.javadoc.public}"
package="${maven.javadoc.package}"
private="${maven.javadoc.private}"
version="${maven.javadoc.version}"
use="${maven.javadoc.use}"
windowtitle="${maven.javadoc.windowtitle}"
doctitle="${maven.javadoc.windowtitle}"
bottom="${copyright}"
stylesheetfile="${maven.javadoc.stylesheet}"
additionalparam="${maven.javadoc.additionalparam}"
useexternalfile="${maven.javadoc.useexternalfile}">
Now we get past the javadoc and junit OutOfMemoryErrors, but the tasklist-plugin (vdoclet is the issue here), and linkcheck-plugin are still causing OutOfMemory and StackOverflow problems.
The smaller of the two projects (1581 classes) generates a 5110 html files. linkcheck does not like dealing with this many html files.
If the ratio of generated html to project classes (3.23) holds even (which is unlikely), then the larger project (4166 classes) would generate 13,456 html files! (eek! that would be a horrid site:deploy, hmmm, wonder if a site:rsyncdeploy would be a good idea?)
Personal Conclusion:
- junit issue can be resolved within existing codebase.
- javadoc needs to add the maxmemory attribute, property to set it, a default to work off of (256MB?) and documentation. I'll be happy to write up a quick patch for this when I get back home (I have no cvs access at the office).
- tasklist needs work, it cannot be forked (yet).
- linkcheck needs work, it cannot be forked, looks like it needs to be refactored to handle large projects.
Ideas generated from this effort:
- would a site:rsyncdeploy be something desired? (not for v1.0, but how about v1.1?)
- a different tasklist approach, not using vdoclet / velocity, but some other approach (antlr parsing to xml?), and to include "@todo", "TODO", "XXX", "FIXME" comments too be warranted?
- A tool to generate large dummy projects for testing build tools such as maven / ant / plugins / etc should be created to help test things. (JDummyProject?)
Set
MAVEN_OPTS=-Xmx512m
as an environment variable and re-run it.