GraphLab Project

graphlab.plugins.automaticupdator.net.interdirected.autoupdate
Class AntLauncher

java.lang.Object
  extended by graphlab.plugins.automaticupdator.net.interdirected.autoupdate.AntLauncher

public class AntLauncher
extends java.lang.Object

AntLauncher This is basically a copy of org.apache.tools.ant.launch.Launcher. I needed the run method to be public, and I needed the parameters to be assigned in the instantiation of the class instead. This just seemed to make more sense to me than statically running the MAIN from the original Launcher, or executing it as an exec from a batch file.

Author:
Michael Quattlebaum
See Also:
org.apache.tools.ant.launch.Launcher

Constructor Summary
AntLauncher()
           
 
Method Summary
 void AppendArgs(java.lang.String add_argument)
          AppendArgs This method is used to add arguments to the arguments array used in ANT.
 void AppendArgs(java.lang.String add_argument, java.lang.String add_value)
          AppendArgs This is a shortcut to the AppendArgs(String) method in case you have a parameter/value pair that need to be added.
 java.lang.String GetAntLocation()
           
 void ResetArgs()
          ResetArgs This method resets the arguments array to a null value.
 java.io.BufferedReader run()
          run This method is used to create a new Java JVM to handle org.apache.tools.ant.launch.Launcher and capture standard out and redirect it to the command line.
 void SetAntLocation(java.lang.String antlocation)
           
 void SetBuildFile(java.lang.String buildfile)
           
 void SetClassPath(java.lang.String classpath)
           
 void SetListenerClass(java.lang.String listener)
          SetListenerClass sets the listener class file for the ANT build.
 void SetRunDirectory(java.lang.String run_dir)
          SetRunDirectory is used to set the base run directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntLauncher

public AntLauncher()
Method Detail

AppendArgs

public void AppendArgs(java.lang.String add_argument)
AppendArgs This method is used to add arguments to the arguments array used in ANT. Any argument that could be passed on the command line of an ant launch can be added as an argument here. If a value is to be passed with the argument, the user must pass the argument flag first (with the "-" character included). For example, to add the -lib parameter, you must call this method twice, once with "-lib" and once with the actual value of "./lib".

Parameters:
add_argument - Argument to add to the arguments array.

AppendArgs

public void AppendArgs(java.lang.String add_argument,
                       java.lang.String add_value)
AppendArgs This is a shortcut to the AppendArgs(String) method in case you have a parameter/value pair that need to be added. It just calls AppendArgs(String) twice.

Parameters:
add_argument -
add_value -

ResetArgs

public void ResetArgs()
ResetArgs This method resets the arguments array to a null value. This should not be used unless you need to eliminate the default library location (-lib ./lib) from the parameters.


SetRunDirectory

public void SetRunDirectory(java.lang.String run_dir)
SetRunDirectory is used to set the base run directory. From the AutomatedUpdate, it should under normal conditions be set to the application directory.

Parameters:
run_dir - The directory that ANT should launch from.

SetListenerClass

public void SetListenerClass(java.lang.String listener)
SetListenerClass sets the listener class file for the ANT build. The listener class will then be used to set the output stream so that it is used by the status window.

Parameters:
listener - A String with the name of the listening class.

SetBuildFile

public void SetBuildFile(java.lang.String buildfile)

SetAntLocation

public void SetAntLocation(java.lang.String antlocation)

GetAntLocation

public java.lang.String GetAntLocation()

SetClassPath

public void SetClassPath(java.lang.String classpath)

run

public java.io.BufferedReader run()
                           throws java.lang.Exception
run This method is used to create a new Java JVM to handle org.apache.tools.ant.launch.Launcher and capture standard out and redirect it to the command line.

Throws:
java.lang.Exception

GraphLab Project