org.appfuse.mojo.installer
Class AntUtils

java.lang.Object
  extended by org.appfuse.mojo.installer.AntUtils

public class AntUtils
extends Object

This class will provide a set of methods to interact with the ant build system at a java level.

Author:
Scott Ryan

Constructor Summary
protected AntUtils()
          Creates a new AntUtilities object.
 
Method Summary
static org.apache.tools.ant.types.FileSet createFileset(String inDirectory, String inIncludePattern, List inExcludePatterns)
          This method will create a fileset of files to be processed based on a diretory location and a set of include and exclude patterns.
static org.apache.tools.ant.Project createProject()
          This method will create an ant antProject object.
static List generateFileNameListFromPattern(String inDirectory, String inPattern)
          This method will take an ant based search pattern and a starting directory and return all the file names that match that pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntUtils

protected AntUtils()
Creates a new AntUtilities object. Utility classes do not have public contructors.

Method Detail

createProject

public static org.apache.tools.ant.Project createProject()
This method will create an ant antProject object.

Returns:
The ant antProject for use by tasks.

generateFileNameListFromPattern

public static List generateFileNameListFromPattern(String inDirectory,
                                                   String inPattern)
This method will take an ant based search pattern and a starting directory and return all the file names that match that pattern.

Parameters:
inDirectory - The starting directory to use to locate files.
inPattern - The pattern to use in matching file names.
Returns:
A list of file names that match the pattern in the target directory

createFileset

public static org.apache.tools.ant.types.FileSet createFileset(String inDirectory,
                                                               String inIncludePattern,
                                                               List inExcludePatterns)
This method will create a fileset of files to be processed based on a diretory location and a set of include and exclude patterns.

Parameters:
inDirectory - The directory containing the files to be maintained in the fileset.
inIncludePattern - The list of patterns to match and include in the fileset.
inExcludePatterns - The list of patterns to match and exclude in the fileset.
Returns:
The file set to process.


Copyright © 2003-2012. All Rights Reserved.