ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Handfield <>
Subject [PATCH]: Added memory options and fixes to Java and Javadoc tasks
Date Fri, 31 Mar 2000 02:13:06 GMT

These patches are refinements of the one I sent to the mailing list last
week that added an option to the Javadoc task which allowed you to
specify the maximum memory size of the javadoc JVM.

What I did at first

Following the suggestions from the list I tried to place the memory
options on the Java task and have the Javadoc task inherit from the Java
task.   After I finished this, I realized it didn't seem to work very
well.  Some  problems were:

- How to handle the case where the child and parent task have the
 same option name (classpath).

- How to disable options available in the parent task (fork)

- How to handle options in the parent task that must be fixed in
  the child task (classname =

- How to document all this in a clear way.

I still have this code and will be happy to submit/discuss it if anyone
is interested.

What I actually did

Java task:

-  Added a maxmemory and minmemory option

Javadoc task:

-  Added a maxmemory option and minmemory option by hand without 
   inheriting from the Java task

- Fixed and wired up the docletpath option


- Added documentation for the new memory options in the Java and 
  Javac tasks.

- Added documentation for the (existing but undocumented) classpath  
  option on the Java task.

Possible future suggestions

- Separate the forked and in-process Java tasks into two tasks.

- Added documentation that explains java classes should be
  executed in-process whenever possible, and that the JAVACMD
  environment variable can be used to raise the memory limits
  of the Ant JVM (and thus all in-process subtasks)

- Factor the common code in java fork and javadoc into a common class.

I would be happy to look into implementing these or other suggestions
after these patches are committed.

Jay Handfield
View raw message