Class CustomExecute

  • All Implemented Interfaces:
    org.apache.commons.exec.Executor

    public class CustomExecute
    extends org.apache.commons.exec.DefaultExecutor
    An extension of org.apache.commons.exec.Execute that adds the ability to retrieve a spanwed process.
    Author:
    Jerry Vos
    • Constructor Detail

      • CustomExecute

        public CustomExecute()
    • Method Detail

      • setWorkingDirectory

        public void setWorkingDirectory​(File wd)
        Specified by:
        setWorkingDirectory in interface org.apache.commons.exec.Executor
        Overrides:
        setWorkingDirectory in class org.apache.commons.exec.DefaultExecutor
      • spawnAndReturnProcess

        public Process spawnAndReturnProcess()
                                      throws IOException
        Starts a process defined by the command line. Ant will not wait for this process, nor log its output. This code was taken from the super's spawn method and differs in that it returns the spawn process.
        Throws:
        IOException - The exception is thrown, if launching of the subprocess failed
      • setCommandLine

        public void setCommandLine​(org.apache.commons.exec.CommandLine commandLine)
      • setEnvironment

        public void setEnvironment​(Map environment)