git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1055418 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -1,5 +1,5 @@ | |||||
| Apache Ant | Apache Ant | ||||
| Copyright 1999-2010 The Apache Software Foundation | |||||
| Copyright 1999-2011 The Apache Software Foundation | |||||
| The <sync> task is based on code Copyright (c) 2002, Landmark | The <sync> task is based on code Copyright (c) 2002, Landmark | ||||
| Graphics Corp that has been kindly donated to the Apache Software | Graphics Corp that has been kindly donated to the Apache Software | ||||
| @@ -10,6 +10,10 @@ Fixed bugs: | |||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| * The <javacc>, <jjtree> and <jjdoc> now support a new maxmemory | |||||
| attribute. | |||||
| Bugzilla Report 50513. | |||||
| Changes from Ant 1.8.1 TO Ant 1.8.2 | Changes from Ant 1.8.1 TO Ant 1.8.2 | ||||
| =================================== | =================================== | ||||
| @@ -181,6 +181,12 @@ | |||||
| <td valign="top">Sets the USER_TOKEN_MANAGER grammar option. This is a boolean option.</td> | <td valign="top">Sets the USER_TOKEN_MANAGER grammar option. This is a boolean option.</td> | ||||
| <td valign="top" align="center">No</td> | <td valign="top" align="center">No</td> | ||||
| </tr> | </tr> | ||||
| <tr> | |||||
| <td valign="top">maxmemory</td> | |||||
| <td valign="top">Max amount of memory to allocate to the forked | |||||
| VM. <em>since Ant 1.8.3</em></td> | |||||
| <td align="center" valign="top">No</td> | |||||
| </tr> | |||||
| </table> | </table> | ||||
| <h3>Example</h3> | <h3>Example</h3> | ||||
| <blockquote><pre> | <blockquote><pre> | ||||
| @@ -95,6 +95,13 @@ option.</td> | |||||
| <td ALIGN=CENTER VALIGN=TOP>No</td> | <td ALIGN=CENTER VALIGN=TOP>No</td> | ||||
| </tr> | </tr> | ||||
| <tr> | |||||
| <td valign="top">maxmemory</td> | |||||
| <td valign="top">Max amount of memory to allocate to the forked | |||||
| VM. <em>since Ant 1.8.3</em></td> | |||||
| <td align="center" valign="top">No</td> | |||||
| </tr> | |||||
| </table> | </table> | ||||
| <h3> | <h3> | ||||
| @@ -187,6 +187,13 @@ option.</td> | |||||
| <td ALIGN=CENTER VALIGN=TOP>No</td> | <td ALIGN=CENTER VALIGN=TOP>No</td> | ||||
| </tr> | </tr> | ||||
| <tr> | |||||
| <td valign="top">maxmemory</td> | |||||
| <td valign="top">Max amount of memory to allocate to the forked | |||||
| VM. <em>since Ant 1.8.3</em></td> | |||||
| <td align="center" valign="top">No</td> | |||||
| </tr> | |||||
| </table> | </table> | ||||
| <h3> | <h3> | ||||
| @@ -58,6 +58,7 @@ public class JJDoc extends Task { | |||||
| private CommandlineJava cmdl = new CommandlineJava(); | private CommandlineJava cmdl = new CommandlineJava(); | ||||
| private String maxMemory = null; | |||||
| /** | /** | ||||
| * Sets the TEXT BNF documentation option. | * Sets the TEXT BNF documentation option. | ||||
| @@ -102,6 +103,16 @@ public class JJDoc extends Task { | |||||
| this.javaccHome = javaccHome; | this.javaccHome = javaccHome; | ||||
| } | } | ||||
| /** | |||||
| * Corresponds -Xmx. | |||||
| * | |||||
| * @param max max memory parameter. | |||||
| * @since Ant 1.8.3 | |||||
| */ | |||||
| public void setMaxmemory(String max) { | |||||
| maxMemory = max; | |||||
| } | |||||
| /** | /** | ||||
| * Constructor | * Constructor | ||||
| */ | */ | ||||
| @@ -154,8 +165,8 @@ public class JJDoc extends Task { | |||||
| cmdl.setClassname(JavaCC.getMainClass(classpath, | cmdl.setClassname(JavaCC.getMainClass(classpath, | ||||
| JavaCC.TASKDEF_TYPE_JJDOC)); | JavaCC.TASKDEF_TYPE_JJDOC)); | ||||
| cmdl.setMaxmemory(maxMemory); | |||||
| final Commandline.Argument arg = cmdl.createVmArgument(); | final Commandline.Argument arg = cmdl.createVmArgument(); | ||||
| arg.setValue("-mx140M"); | |||||
| arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath()); | arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath()); | ||||
| final Execute process = | final Execute process = | ||||
| @@ -67,6 +67,7 @@ public class JJTree extends Task { | |||||
| private CommandlineJava cmdl = new CommandlineJava(); | private CommandlineJava cmdl = new CommandlineJava(); | ||||
| private String maxMemory = null; | |||||
| /** | /** | ||||
| * Sets the BUILD_NODE_FILES grammar option. | * Sets the BUILD_NODE_FILES grammar option. | ||||
| @@ -192,6 +193,16 @@ public class JJTree extends Task { | |||||
| this.javaccHome = javaccHome; | this.javaccHome = javaccHome; | ||||
| } | } | ||||
| /** | |||||
| * Corresponds -Xmx. | |||||
| * | |||||
| * @param max max memory parameter. | |||||
| * @since Ant 1.8.3 | |||||
| */ | |||||
| public void setMaxmemory(String max) { | |||||
| maxMemory = max; | |||||
| } | |||||
| /** | /** | ||||
| * Constructor | * Constructor | ||||
| */ | */ | ||||
| @@ -267,8 +278,8 @@ public class JJTree extends Task { | |||||
| cmdl.setClassname(JavaCC.getMainClass(classpath, | cmdl.setClassname(JavaCC.getMainClass(classpath, | ||||
| JavaCC.TASKDEF_TYPE_JJTREE)); | JavaCC.TASKDEF_TYPE_JJTREE)); | ||||
| cmdl.setMaxmemory(maxMemory); | |||||
| final Commandline.Argument arg = cmdl.createVmArgument(); | final Commandline.Argument arg = cmdl.createVmArgument(); | ||||
| arg.setValue("-mx140M"); | |||||
| arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath()); | arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath()); | ||||
| final Execute process = | final Execute process = | ||||
| @@ -104,6 +104,8 @@ public class JavaCC extends Task { | |||||
| protected static final String ORG_JJTREE_CLASS = COM_JJTREE_CLASS; | protected static final String ORG_JJTREE_CLASS = COM_JJTREE_CLASS; | ||||
| protected static final String ORG_JJDOC_CLASS = COM_JJDOC_CLASS; | protected static final String ORG_JJDOC_CLASS = COM_JJDOC_CLASS; | ||||
| private String maxMemory = null; | |||||
| /** | /** | ||||
| * Sets the LOOKAHEAD grammar option. | * Sets the LOOKAHEAD grammar option. | ||||
| * @param lookahead an <code>int</code> value. | * @param lookahead an <code>int</code> value. | ||||
| @@ -308,6 +310,16 @@ public class JavaCC extends Task { | |||||
| this.javaccHome = javaccHome; | this.javaccHome = javaccHome; | ||||
| } | } | ||||
| /** | |||||
| * Corresponds -Xmx. | |||||
| * | |||||
| * @param max max memory parameter. | |||||
| * @since Ant 1.8.3 | |||||
| */ | |||||
| public void setMaxmemory(String max) { | |||||
| maxMemory = max; | |||||
| } | |||||
| /** | /** | ||||
| * Constructor | * Constructor | ||||
| */ | */ | ||||
| @@ -361,8 +373,8 @@ public class JavaCC extends Task { | |||||
| cmdl.setClassname(JavaCC.getMainClass(classpath, | cmdl.setClassname(JavaCC.getMainClass(classpath, | ||||
| JavaCC.TASKDEF_TYPE_JAVACC)); | JavaCC.TASKDEF_TYPE_JAVACC)); | ||||
| cmdl.setMaxmemory(maxMemory); | |||||
| final Commandline.Argument arg = cmdl.createVmArgument(); | final Commandline.Argument arg = cmdl.createVmArgument(); | ||||
| arg.setValue("-mx140M"); | |||||
| arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath()); | arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath()); | ||||
| Execute.runCommand(this, cmdl.getCommandline()); | Execute.runCommand(this, cmdl.getCommandline()); | ||||