org.codehaus.mojo.appfuse.utility
Class AntUtilities

java.lang.Object
  extended by org.codehaus.mojo.appfuse.utility.AntUtilities

public class AntUtilities
extends java.lang.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 AntUtilities()
          Creates a new AntUtilities object.
 
Method Summary
static org.apache.tools.ant.types.FileSet createFileset(java.lang.String inDirectory, java.lang.String inIncludePattern, java.util.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 project object.
static java.util.List generateFileNameListFromPattern(java.lang.String inDirectory, java.lang.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

AntUtilities

protected AntUtilities()
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 project object.

Returns:
The ant project for use by tasks.

generateFileNameListFromPattern

public static java.util.List generateFileNameListFromPattern(java.lang.String inDirectory,
                                                             java.lang.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(java.lang.String inDirectory,
                                                               java.lang.String inIncludePattern,
                                                               java.util.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.
inIncludePatterns - 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 © 2006-2009. All Rights Reserved.