and fork="false" git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275155 13f79535-47bb-0310-9956-ffa450edef68master
@@ -88,7 +88,7 @@ JVM. | |||||
<tr> | <tr> | ||||
<td valign="top">failonerror</td> | <td valign="top">failonerror</td> | ||||
<td valign="top">Stop the buildprocess if the command exits with a | <td valign="top">Stop the buildprocess if the command exits with a | ||||
returncode other than 0. Default is "false"(see <a href="#failonerror">note</a>)</td> | |||||
returncode other than 0. Default is "false"<!--(see <a href="#failonerror">note)--></a></td> | |||||
<td align="center" valign="top">No</td> | <td align="center" valign="top">No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -220,12 +220,13 @@ see <a href="../CoreTypes/permissions.html">permissions</a></p> | |||||
<p>When the permission RuntimePermission exitVM has not been granted (or has | <p>When the permission RuntimePermission exitVM has not been granted (or has | ||||
been revoked) the System.exit() call will be intercepted | been revoked) the System.exit() call will be intercepted | ||||
and treated like indicated in <i>failonerror</i>.</p> | and treated like indicated in <i>failonerror</i>.</p> | ||||
<!-- | |||||
<p><a name="failonerror"/> | <p><a name="failonerror"/> | ||||
If you specify <code>failonerror="true"</code> and you do not specify permissions, | If you specify <code>failonerror="true"</code> and you do not specify permissions, | ||||
a set of default permissions will be added to your java invocation making sure that | a set of default permissions will be added to your java invocation making sure that | ||||
a non zero return code will lead to a <code>BuildException</code>. | a non zero return code will lead to a <code>BuildException</code>. | ||||
</p> | </p> | ||||
--> | |||||
<p>Settings will be ignored if fork is enabled.</p> | <p>Settings will be ignored if fork is enabled.</p> | ||||
<p><em>since Ant 1.6</em>.</p> | <p><em>since Ant 1.6</em>.</p> | ||||
@@ -180,12 +180,13 @@ public class Java extends Task { | |||||
log("bootclasspath ignored when same JVM is used.", | log("bootclasspath ignored when same JVM is used.", | ||||
Project.MSG_WARN); | Project.MSG_WARN); | ||||
} | } | ||||
/* | |||||
if (perm == null && failOnError == true) { | if (perm == null && failOnError == true) { | ||||
perm = new Permissions(); | perm = new Permissions(); | ||||
log("running " + this.cmdl.getClassname() | log("running " + this.cmdl.getClassname() | ||||
+ " with default permissions (exit forbidden)", Project.MSG_VERBOSE); | + " with default permissions (exit forbidden)", Project.MSG_VERBOSE); | ||||
} | } | ||||
*/ | |||||
log("Running in same VM " + cmdl.describeJavaCommand(), | log("Running in same VM " + cmdl.describeJavaCommand(), | ||||
Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
} | } | ||||
@@ -195,7 +195,7 @@ public class JavaTest extends BuildFileTest { | |||||
executeTarget("testResultPropertyNonZeroNoFork"); | executeTarget("testResultPropertyNonZeroNoFork"); | ||||
assertEquals("-1",project.getProperty("exitcode")); | assertEquals("-1",project.getProperty("exitcode")); | ||||
} | } | ||||
/* | |||||
public void testRunFailWithFailOnError() { | public void testRunFailWithFailOnError() { | ||||
expectBuildExceptionContaining("testRunFailWithFailOnError", | expectBuildExceptionContaining("testRunFailWithFailOnError", | ||||
"non zero return code", | "non zero return code", | ||||
@@ -205,6 +205,7 @@ public class JavaTest extends BuildFileTest { | |||||
public void testRunSuccessWithFailOnError() { | public void testRunSuccessWithFailOnError() { | ||||
executeTarget("testRunSuccessWithFailOnError"); | executeTarget("testRunSuccessWithFailOnError"); | ||||
} | } | ||||
*/ | |||||
public void testSpawn() { | public void testSpawn() { | ||||
FileUtils fileutils = FileUtils.newFileUtils(); | FileUtils fileutils = FileUtils.newFileUtils(); | ||||
File logFile = fileutils.createTempFile("spawn","log", project.getBaseDir()); | File logFile = fileutils.createTempFile("spawn","log", project.getBaseDir()); | ||||