This is a very short description of the cleaned up Ant exec task design:
* Exec: the former Ant task class used to create and configure Execute
instances. Now mainly a convience class for starting new Execute
instances.
* Execute: the main class for running one process. Handles creation
and configuration of the necessary objects (stream pump, watchdog,
process destroyer). Can wait for the full execution time to enable
synchronous return of the process return code or spawn a process to
run async.
* Process destroyer: adds itself as a shutdown hook, Execute adds and
removes created processes to ensure that they are correctly destroyed
when the JVM stops.
* WatchDog: used to time out a running process. After a given time has
passed, the process is checked if it's still running and there after
destroyed.
* CommandLauncher: a family of classes for actually starting the
processes. Implementations exist for e.g. Java 1.1, Java 1.3, WinNT,
Mac, VMS and so on. These classes handles the platform specifics.
* Environment: used to retrive the current environment as well as
setting new environment variables. Reading the current environment is
done using platform specific commands (e.g. "cmd /c set", "env",
"/bin/env") and parsing the result. This could of course be improved
on J2SE 5.0 to use System.getenv() instead.
* StreamPumper: used to read/write the three stream (in, out, error)
simultaniously.
* CommandLine: class for handling (e.g. parsing, quoting) command lines.
It might be worth extracting the interface from Ant, creating an
implementation (using the interface) and then using this in a branch of
Ant just to test that we've extracted all the necessary functionality.
IIRC Environment is really derived through JavaEnvUtils (though I'll
have to check source). A common interface for a commandLine would allow
us to create platform specific commandLines depending on environment
2c
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]