Class AntExecutor


  • @Deprecated
    public class AntExecutor
    extends Object
    Deprecated.
    Please use the AntExecutor in org.openbravo.base package (contained in src-core.jar)
    The AntExecutor class allows to execute ant tasks in a given build.xml file.
    • Constructor Detail

      • AntExecutor

        public AntExecutor​(String buildFile,
                           String baseDir)
                    throws Exception
        Deprecated.
        Initializes a newly created AntExecutor object assigning it the build.xml file to execute tasks from and the base directory where they will be executed.
        Parameters:
        buildFile - - Complete path to the build.xml file
        baseDir - - Complete path to the base directory
        Throws:
        Exception - - if an error occurs loading the xml file
      • AntExecutor

        public AntExecutor​(String buildDir)
                    throws Exception
        Deprecated.
        Initializes a new AntExecutor object assigning it the build.xml file in the directory passed as parameter, the base directory is the same as the one the build.xml is in.
        Parameters:
        buildDir - - Directory where is the build.xml file and that will be the base directory
        Throws:
        Exception - - if an error occurs loading the xml file
    • Method Detail

      • setLogFile

        @Deprecated
        public String setLogFile​(String directory,
                                 String logFileName)
                          throws Exception
        Deprecated.
        Sets a file where the execution log will be saved.
        Parameters:
        directory - - Path to the directory for the file
        logFileName - - Name of the log file
        Returns:
        - The complete file name (including directory)
        Throws:
        Exception
      • setLogFile

        @Deprecated
        public String setLogFile​(String name)
                          throws Exception
        Deprecated.
        Sets a file where the execution log will be saved. It only receives the file name, the path is the log directory inside the base directory
        Parameters:
        name - - File name
        Returns:
        - The complete file name (including directory)
        Throws:
        Exception
      • setLogFileInOBPrintStream

        @Deprecated
        public void setLogFileInOBPrintStream​(File f)
        Deprecated.
      • setLogFileAndListener

        public void setLogFileAndListener​(String filename)
        Deprecated.
      • setOBPrintStreamLog

        @Deprecated
        public void setOBPrintStreamLog​(PrintWriter p)
        Deprecated.
        Sets two OBPrintStream objects to maintain the execution log. One is for standard log and the other one for the errors.
        See Also:
        OBPrintStream
      • setProperty

        public void setProperty​(String property,
                                String value)
        Deprecated.
        Set a value to a property to the project.
        Parameters:
        property - - Property name
        value - - Value to assign
      • runTask

        public void runTask​(String task)
                     throws Exception
        Deprecated.
        Executes an ant task
        Parameters:
        task - - Name of the task to execute
        Throws:
        Exception - - In case the project is not loaded
      • runTask

        public void runTask​(Vector<String> tasks)
                     throws Exception
        Deprecated.
        Executes a set of ant tasks
        Parameters:
        tasks - - A Vector<String> with the names of the tasks to be executed
        Throws:
        Exception - - In case the project is not loaded
      • setFinished

        @Deprecated
        public void setFinished​(boolean v)
        Deprecated.
        Sets the finished attribute to the log. It used for loggin purposes.
        Parameters:
        v - - boolean value to set
        See Also:
        OBPrintStream
      • getErr

        @Deprecated
        public String getErr()
        Deprecated.
        Returns an String with error messages, in case no error is logged a "Success" String is returned.
        Returns:
        - error String
      • hasErrorOccured

        @Deprecated
        public boolean hasErrorOccured()
        Deprecated.
      • closeLogFile

        public void closeLogFile()
        Deprecated.