Class AntBuildInvoker

java.lang.Object
org.wso2.carbon.utils.AntBuildInvoker

public class AntBuildInvoker extends Object
The class AntBuildInvoker provides a Java utility engine to invoke ANT targets of a given build file.
  • Constructor Details

    • AntBuildInvoker

      public AntBuildInvoker(File buildFile)
      The constructor
      Parameters:
      buildFile - the ANT build file
  • Method Details

    • invokeDefaultTarget

      public void invokeDefaultTarget() throws AntBuildException
      Invokes the default target of the build file. Runs in silent mode
      Throws:
      AntBuildException - if invoking the target failed
    • invokeDefaultTarget

      public void invokeDefaultTarget(boolean showOutput) throws AntBuildException
      Invokes the default target of the build file. Runs in verbose mode
      Throws:
      AntBuildException - if invoking the target failed
    • invokeTarget

      public void invokeTarget(String target) throws AntBuildException
      Invokes the given target of the build file. Runs in silent mode
      Parameters:
      target - the target to be executed
      Throws:
      AntBuildException - if invoking the target failed
    • invokeTarget

      public void invokeTarget(String target, boolean showOutput) throws AntBuildException
      Invokes the given target of the build file under the given mode (silent/verbose)
      Parameters:
      target - the target to be executed
      Throws:
      AntBuildException - if invoking the target failed