From 31e8fc7aa79612812e799ad94d6fa34a096df17c Mon Sep 17 00:00:00 2001
From: Jan Materne For more information about For more information about Easiest way of changing the exit-behaviour is subclassing the original main class:
+-logger
and
-listener
see
Loggers & Listeners.
-inputhandler
see
InputHandler.
+
+public class CustomExitCode extends org.apache.tools.ant.Main {
+ protected void exit(int exitCode) {
+ // implement your own behaviour, e.g. NOT exiting the JVM
+ }
+}
+
and starting Ant with access (-lib path-to-class) to this class.
+
@@ -161,7 +172,7 @@ added to the classpath is as follows:
Note that the CLASSPATH environment variable is passed to Ant using a -lib
-option. Ant itself is started with a very minimalistic classpath.
+option. Ant itself is started with a very minimalistic classpath.
Ant should work perfectly well with an empty CLASSPATH environment variable,
something the the -noclasspath option actually enforces. We get many more support calls related to classpath problems (especially quoting problems) than
we like.
@@ -244,7 +255,7 @@ available via Project instance, I searched for them with a
grep -r -n "getPropert" * > ..\grep.txt
command. After that I filtered out the often-used but not-so-important values (most of them
-read-only values): path.separator, ant.home, basedir, user.dir, os.name,
+read-only values): path.separator, ant.home, basedir, user.dir, os.name,
line.separator, java.home, java.version, java.version, user.home, java.class.path
And I filtered out the getPropertyHelper access.
ant.file.* |
read only: full filename of the build file of Ant projects | -This is set to the name of a file by project; + | This is set to the name of a file by project; this lets you determine the location of - <import>-ed files, + <import>-ed files, | @@ -455,8 +466,8 @@ org.apache.tools.ant.Executor implementation specified here.