org.codehaus.enunciate.main
Class Enunciate

java.lang.Object
  extended by org.codehaus.enunciate.main.Enunciate

public class Enunciate
extends java.lang.Object

Main enunciate entry point.

Author:
Ryan Heaton

Nested Class Summary
static interface Enunciate.FileVisitor
          File visitor interface used to visit files.
 class Enunciate.Stepper
          Mechansim for stepping through the Enunciate build process.
static class Enunciate.Target
          The targets for the project.
 
Constructor Summary
protected Enunciate()
          Protected to ensure the source files are set.
  Enunciate(java.util.List<java.lang.String> sourceFiles)
          Construct an enunciate mechanism on the specified source files.
  Enunciate(java.lang.String[] sourceFiles)
          Construct an enunciate mechanism on the specified source files.
  Enunciate(java.lang.String[] sourceFiles, EnunciateConfiguration config)
          Construct an enunciate mechanism on the specified source files with the specified config.
 
Method Summary
 void addAdditionalSourceRoot(java.io.File root)
          Add an additional source root for Enunciate to process.
 boolean addArtifact(Artifact artifact)
          Adds the specified artifact.
 void addClasspathHandler(ClasspathHandler handler)
          Add a classpath handler.
 void addExport(java.lang.String artifactId, java.io.File destination)
          Adds an export.
 void addWebAppFragment(WebAppFragment fragment)
          Add a webapp fragment for Enunciate to process.
protected  void buildFileList(java.util.List<java.io.File> list, java.io.File... dirs)
          Adds all files in specified directories to a list.
 void compileSources(java.io.File compileDir)
          Compile all sources and any additional (generated) sources to the specified directory.
 void copyDir(java.io.File from, java.io.File to, java.io.File... excludes)
          Copy an entire directory from one place to another.
 void copyFile(java.io.File from, java.io.File to)
          Copy a file from one location to another.
 void copyFile(java.io.File src, java.io.File fromDir, java.io.File toDir)
          Copy a file from one directory to another, preserving directory structure.
 void copyResource(java.lang.String resource, java.io.File to)
          Copies a resource on the classpath to a file.
 void copyResource(java.net.URL url, java.io.File to)
          Copies a resource to a file.
 java.io.File createTempDir()
          Creates a temporary directory.
 java.io.File createTempFile(java.lang.String baseName, java.lang.String suffix)
          Creates a temporary file.
 void debug(java.lang.String message, java.lang.Object... formatArgs)
          Handle a debug-level message.
protected  void doBuild()
          Do the build logic.
protected  void doClose()
          Logic for handling the closing of the Enunciate mechanism.
protected  void doCompile()
          Do the compile logic.
protected  void doGenerate()
          Do the generate logic.
protected  void doInit()
          Do the initialization logic.
protected  void doPackage()
          Do the package logic.
 void error(java.lang.String message, java.lang.Object... formatArgs)
          Handle an error-level message.
 void execute()
          Execute the mechanism.
 void extractBase(java.io.InputStream baseIn, java.io.File toDir)
          Extracts the (zipped up) base to the specified directory.
 Artifact findArtifact(java.lang.String artifactId)
          Finds the artifact of the given id.
 java.util.Set<java.io.File> getAdditionalSourceRoots()
          The additional source roots.
 java.util.Set<Artifact> getArtifacts()
          The artifacts exportable by enunciate.
 java.lang.String getBuildClasspath()
          The build classpath.
 java.io.File getBuildDir()
          The directory to use to build the war.
 java.io.File getCompileDir()
          The destination directory for the compiled classes.
 EnunciateConfiguration getConfig()
           
 java.io.File getConfigFile()
          The enunciate config file.
 java.lang.String getEncoding()
           
 java.lang.String getEnunciateBuildClasspath()
          The enunciate classpath to use when building the application.
 java.lang.String getEnunciateRuntimeClasspath()
          The enunciate classpath to use when running the application (after being built).
 java.util.Collection<java.lang.String> getFiles(java.io.File basedir, java.io.FileFilter filter)
          Finds all files in the specified base directory using the specified filter.
 java.io.File getGenerateDir()
          The preprocessor directory (-s).
 java.util.Collection<java.lang.String> getJavaFiles(java.io.File basedir)
          Finds all java files in the specified base directory.
protected  java.io.File getOldest(java.util.List<java.io.File> files)
          Get the earliest modified file.
 java.io.File getPackageDir()
          The package directory.
 java.lang.Object getProperty(java.lang.String property)
          Get a property value.
 java.lang.String getRuntimeClasspath()
          The runtime classpath.
 java.io.File getScratchDir()
          A scratch directory for Enunciate to use.
 java.lang.String[] getSourceFiles()
          Get the source files for this enunciate mechanism.
 Enunciate.Stepper getStepper()
          Get a stepper that can be used to step through the Enunciate mechanism, which will be initialized.
 Enunciate.Target getTarget()
          The target.
 java.lang.String getVersion()
          The version of the Enunciate mechanism.
 java.util.Set<WebAppFragment> getWebAppFragments()
          The webapp fragments.
protected  java.io.File getYoungest(java.util.List<java.io.File> files)
          Get the latest modified file.
 void info(java.lang.String message, java.lang.Object... formatArgs)
          Handle an info-level message.
protected  void initModules(java.util.Collection<DeploymentModule> deploymentModules)
          Initialize each module.
protected  void invokeApt(java.lang.String[] sourceFiles, java.lang.String... additionalApiClasses)
          Invokes APT on the specified source files.
 void invokeJavac(java.io.File compileDir, java.lang.String[] sourceFiles)
          Invokes javac on the specified source files.
 void invokeJavac(java.lang.String classpath, java.io.File compileDir, java.lang.String[] sourceFiles)
          Invokes javac on the specified source files.
 void invokeJavac(java.lang.String classpath, java.lang.String version, java.io.File compileDir, java.util.List<java.lang.String> additionalArgs, java.lang.String[] sourceFiles)
          Invokes javac on the specified source files.
 boolean isCompileDebugInfo()
          Whether to compile with debug info.
 boolean isDebug()
          Whether to print debugging information.
 boolean isJavacCheck()
          Whether to do a javac check before invoking the Enunciate mechanism.
 boolean isModuleEnabled(java.lang.String moduleName)
          Whether the specified module is enabled.
 boolean isUpToDate(java.io.File sourceFile, java.io.File destFile)
          Determines whether a destination file is newer than a source file.
protected  boolean isUpToDate(java.util.List<java.io.File> sourceFiles, java.io.File destFile)
          Whether a given destination file is newer than all the specified source files.
 boolean isUpToDateWithSources(java.io.File destDir)
          Whether all files in the specified directory are newer than all the source files.
 boolean isVerbose()
          Whether to be verbose.
protected  EnunciateConfiguration loadConfig()
          Reads the enunciate configuration from the specified file, if any.
protected  java.lang.String lookupSourceEntry(java.io.File pathEntry)
          Lookup the source entry for the specified classpath entry.
static void main(java.lang.String[] args)
           
 java.io.File resolvePath(java.lang.String filePath)
          Resolves a path relative to the Enunciate config file, if present, otherwise the file will be a relative file to the current user directory.
protected  void scanClasspath(java.util.Collection<ClasspathHandler> classpathHandlers)
          Scans the Enunciate classpath, handling each entry according to each ClasspathHandler.
 void setBuildClasspath(java.lang.String buildClasspath)
          The build classpath.
 void setBuildDir(java.io.File buildDir)
          The directory to use to build the war.
 void setCompileDebugInfo(boolean compileDebugInfo)
          Whether to compile with debug info.
 void setCompileDir(java.io.File compileDir)
          The destination directory for the compiled classes.
 void setConfig(EnunciateConfiguration config)
          Set the configuration for the mechanism.
 void setConfigFile(java.io.File configFile)
          The enunciate config file.
 void setDebug(boolean debug)
          Whether to print debugging information.
 void setEncoding(java.lang.String encoding)
           
 void setGenerateDir(java.io.File generateDir)
          The preprocessor directory (-s).
 void setJavacCheck(boolean javacCheck)
          Whether to do a javac check before invoking the Enunciate mechanism.
 void setPackageDir(java.io.File packageDir)
          The package directory.
 void setProperty(java.lang.String property, java.lang.Object value)
          Set a property value.
 void setRuntimeClasspath(java.lang.String runtimeClasspath)
          The runtime classpath.
 void setScratchDir(java.io.File scratchDir)
          A scratch directory for Enunciate to use.
protected  void setSourceFiles(java.lang.String[] sourceFiles)
          Protected to allow the source files to be set after construction.
 void setTarget(Enunciate.Target target)
          The target.
 void setVerbose(boolean verbose)
          Whether to be verbose.
 void warn(java.lang.String message, java.lang.Object... formatArgs)
          Handle a warn-level message.
 void zip(java.io.File toFile, java.io.File... dirs)
          zip up directories to a specified zip file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enunciate

protected Enunciate()
Protected to ensure the source files are set.


Enunciate

public Enunciate(java.lang.String[] sourceFiles)
Construct an enunciate mechanism on the specified source files.

Parameters:
sourceFiles - The source files.

Enunciate

public Enunciate(java.lang.String[] sourceFiles,
                 EnunciateConfiguration config)
Construct an enunciate mechanism on the specified source files with the specified config.

Parameters:
sourceFiles - The source files.
config - The config

Enunciate

public Enunciate(java.util.List<java.lang.String> sourceFiles)
Construct an enunciate mechanism on the specified source files.

Parameters:
sourceFiles - The source files.
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setSourceFiles

protected void setSourceFiles(java.lang.String[] sourceFiles)
Protected to allow the source files to be set after construction.

Parameters:
sourceFiles - The source files to enunciate.

getStepper

public Enunciate.Stepper getStepper()
                             throws EnunciateException,
                                    java.io.IOException
Get a stepper that can be used to step through the Enunciate mechanism, which will be initialized.

Returns:
A stepper.
Throws:
java.util.ConcurrentModificationException - If a stepper has already been retrieved.
EnunciateException - If there was an error initializing the Enunciate mechanism.
java.io.IOException - If there was an error initializing the Enunciate mechanism.

execute

public void execute()
             throws EnunciateException,
                    java.io.IOException
Execute the mechanism.

Throws:
EnunciateException
java.io.IOException

doClose

protected void doClose()
                throws EnunciateException,
                       java.io.IOException
Logic for handling the closing of the Enunciate mechanism. Closes the modules and exports the artifacts.

Throws:
EnunciateException
java.io.IOException

doPackage

protected void doPackage()
                  throws java.io.IOException,
                         EnunciateException
Do the package logic.

Throws:
java.io.IOException
EnunciateException

doBuild

protected void doBuild()
                throws java.io.IOException,
                       EnunciateException
Do the build logic.

Throws:
java.io.IOException
EnunciateException

doCompile

protected void doCompile()
                  throws java.io.IOException,
                         EnunciateException
Do the compile logic.

Throws:
java.io.IOException
EnunciateException

doGenerate

protected void doGenerate()
                   throws java.io.IOException,
                          EnunciateException
Do the generate logic.

Throws:
java.io.IOException
EnunciateException

scanClasspath

protected void scanClasspath(java.util.Collection<ClasspathHandler> classpathHandlers)
                      throws java.io.IOException
Scans the Enunciate classpath, handling each entry according to each ClasspathHandler.

Throws:
java.io.IOException

lookupSourceEntry

protected java.lang.String lookupSourceEntry(java.io.File pathEntry)
Lookup the source entry for the specified classpath entry. Default implementation returns null.

Parameters:
pathEntry - The path entry for which to lookup the source entry.
Returns:
The source entry, or null if not found.

doInit

protected void doInit()
               throws EnunciateException,
                      java.io.IOException
Do the initialization logic. Loads and initializes the deployment modules.

Throws:
EnunciateException
java.io.IOException

initModules

protected void initModules(java.util.Collection<DeploymentModule> deploymentModules)
                    throws EnunciateException,
                           java.io.IOException
Initialize each module.

Parameters:
deploymentModules - The deployment modules.
Throws:
EnunciateException
java.io.IOException

info

public void info(java.lang.String message,
                 java.lang.Object... formatArgs)
Handle an info-level message.

Parameters:
message - The info message.
formatArgs - The format args of the message.

debug

public void debug(java.lang.String message,
                  java.lang.Object... formatArgs)
Handle a debug-level message.

Parameters:
message - The debug message.
formatArgs - The format args of the message.

warn

public void warn(java.lang.String message,
                 java.lang.Object... formatArgs)
Handle a warn-level message.

Parameters:
message - The warn message.
formatArgs - The format args of the message.

error

public void error(java.lang.String message,
                  java.lang.Object... formatArgs)
Handle an error-level message.

Parameters:
message - The error message.
formatArgs - The format args of the message.

createTempDir

public java.io.File createTempDir()
                           throws java.io.IOException
Creates a temporary directory.

Returns:
A temporary directory.
Throws:
java.io.IOException

createTempFile

public java.io.File createTempFile(java.lang.String baseName,
                                   java.lang.String suffix)
                            throws java.io.IOException
Creates a temporary file. Same as File.createTempFile(String, String) but in the Enunciate scratch directory.

Parameters:
baseName - The base name of the file.
suffix - The suffix.
Returns:
The temp file.
Throws:
java.io.IOException

getSourceFiles

public java.lang.String[] getSourceFiles()
Get the source files for this enunciate mechanism.

Returns:
The source files.

loadConfig

protected EnunciateConfiguration loadConfig()
                                     throws java.io.IOException
Reads the enunciate configuration from the specified file, if any.

Returns:
The configuration, or null if none is specified.
Throws:
java.io.IOException

getJavaFiles

public java.util.Collection<java.lang.String> getJavaFiles(java.io.File basedir)
Finds all java files in the specified base directory.

Parameters:
basedir - The base directory.
Returns:
The collection of java files.

getFiles

public java.util.Collection<java.lang.String> getFiles(java.io.File basedir,
                                                       java.io.FileFilter filter)
Finds all files in the specified base directory using the specified filter.

Parameters:
basedir - The base directory.
filter - The filter to use.
Returns:
The collection of files.

getEnunciateRuntimeClasspath

public java.lang.String getEnunciateRuntimeClasspath()
The enunciate classpath to use when running the application (after being built).

Returns:
The enunciate classpath to use when running the application (after being built).

getEnunciateBuildClasspath

public java.lang.String getEnunciateBuildClasspath()
The enunciate classpath to use when building the application.

Returns:
The enunciate classpath to use when building the application.

invokeApt

protected void invokeApt(java.lang.String[] sourceFiles,
                         java.lang.String... additionalApiClasses)
                  throws java.io.IOException,
                         EnunciateException
Invokes APT on the specified source files.

Parameters:
sourceFiles - The source files.
additionalApiClasses - The FQNs of additional classes (should be found on the Enunciate classpath) that comprise the API.
Throws:
java.io.IOException
EnunciateException

compileSources

public void compileSources(java.io.File compileDir)
                    throws EnunciateException
Compile all sources and any additional (generated) sources to the specified directory.

Parameters:
compileDir - The compile directory.
Throws:
EnunciateException - If the compile fails.

invokeJavac

public void invokeJavac(java.io.File compileDir,
                        java.lang.String[] sourceFiles)
                 throws EnunciateException
Invokes javac on the specified source files. The classpath will be the runtime classpath.

Parameters:
compileDir - The compile directory.
sourceFiles - The source files.
Throws:
EnunciateException - if the compile fails.

invokeJavac

public void invokeJavac(java.lang.String classpath,
                        java.io.File compileDir,
                        java.lang.String[] sourceFiles)
                 throws EnunciateException
Invokes javac on the specified source files.

Parameters:
classpath - The classpath.
compileDir - The compile directory.
sourceFiles - The source files.
Throws:
EnunciateException - if the compile fails.

invokeJavac

public void invokeJavac(java.lang.String classpath,
                        java.lang.String version,
                        java.io.File compileDir,
                        java.util.List<java.lang.String> additionalArgs,
                        java.lang.String[] sourceFiles)
                 throws EnunciateException
Invokes javac on the specified source files.

Parameters:
classpath - The classpath.
version - The Java version to compile to.
compileDir - The compile directory.
additionalArgs - Any additional arguments to the compiler.
sourceFiles - The source files. @throws EnunciateException if the compile fails.
Throws:
EnunciateException

copyDir

public void copyDir(java.io.File from,
                    java.io.File to,
                    java.io.File... excludes)
             throws java.io.IOException
Copy an entire directory from one place to another.

Parameters:
from - The source directory.
to - The destination directory.
excludes - The files to exclude from the copy
Throws:
java.io.IOException

extractBase

public void extractBase(java.io.InputStream baseIn,
                        java.io.File toDir)
                 throws java.io.IOException
Extracts the (zipped up) base to the specified directory.

Parameters:
baseIn - The stream to the base.
toDir - The directory to extract to.
Throws:
java.io.IOException

copyFile

public void copyFile(java.io.File src,
                     java.io.File fromDir,
                     java.io.File toDir)
              throws java.io.IOException
Copy a file from one directory to another, preserving directory structure.

Parameters:
src - The source file.
fromDir - The from directory.
toDir - The to directory.
Throws:
java.io.IOException

copyFile

public void copyFile(java.io.File from,
                     java.io.File to)
              throws java.io.IOException
Copy a file from one location to another.

Parameters:
from - The source file.
to - The destination file.
Throws:
java.io.IOException

copyResource

public void copyResource(java.lang.String resource,
                         java.io.File to)
                  throws java.io.IOException
Copies a resource on the classpath to a file.

Parameters:
resource - The resource to copy.
to - The file to copy to.
Throws:
java.io.IOException

copyResource

public void copyResource(java.net.URL url,
                         java.io.File to)
                  throws java.io.IOException
Copies a resource to a file.

Parameters:
url - The url of the resource.
to - The file to copy to.
Throws:
java.io.IOException

zip

public void zip(java.io.File toFile,
                java.io.File... dirs)
         throws java.io.IOException
zip up directories to a specified zip file.

Parameters:
toFile - The file to zip to.
dirs - The directories to zip up.
Throws:
java.io.IOException

resolvePath

public java.io.File resolvePath(java.lang.String filePath)
Resolves a path relative to the Enunciate config file, if present, otherwise the file will be a relative file to the current user directory.

Parameters:
filePath - The file path to resolve.
Returns:
The resolved file.

isUpToDate

public boolean isUpToDate(java.io.File sourceFile,
                          java.io.File destFile)
Determines whether a destination file is newer than a source file. If a source file is a directory, its timestamp is the timestamp of the latest file. If a destination file is a directory, its timestamp is the timestamp of the earliest file.

Parameters:
sourceFile - The source file.
destFile - The destination file.
Returns:
Whether the destination file is up-to-date.

isUpToDateWithSources

public boolean isUpToDateWithSources(java.io.File destDir)
Whether all files in the specified directory are newer than all the source files.

Parameters:
destDir - The directory.
Returns:
Whether the destination directory is up-to-date.

isUpToDate

protected boolean isUpToDate(java.util.List<java.io.File> sourceFiles,
                             java.io.File destFile)
Whether a given destination file is newer than all the specified source files. If the destination file is a directory its timestamp is the timestamp of the earliest-modified file.

Parameters:
sourceFiles - The specified source files.
destFile - The destination file.
Returns:
Whether the destination file is up-to-date.

getYoungest

protected java.io.File getYoungest(java.util.List<java.io.File> files)
Get the latest modified file.

Parameters:
files - The files.
Returns:
The latest modified.

getOldest

protected java.io.File getOldest(java.util.List<java.io.File> files)
Get the earliest modified file.

Parameters:
files - The files.
Returns:
The earliest modified.

buildFileList

protected void buildFileList(java.util.List<java.io.File> list,
                             java.io.File... dirs)
Adds all files in specified directories to a list.

Parameters:
list - The list.
dirs - The directories.

isVerbose

public boolean isVerbose()
Whether to be verbose.

Returns:
Whether to be verbose.

getEncoding

public java.lang.String getEncoding()
Returns:
the encoding for the javac compiler

setEncoding

public void setEncoding(java.lang.String encoding)
Parameters:
encoding - the encoding for the javac compiler

setVerbose

public void setVerbose(boolean verbose)
Whether to be verbose.

Parameters:
verbose - Whether to be verbose.

isDebug

public boolean isDebug()
Whether to print debugging information.

Returns:
Whether to print debugging information.

setDebug

public void setDebug(boolean debug)
Whether to print debugging information.

Parameters:
debug - Whether to print debugging information.

getVersion

public java.lang.String getVersion()
The version of the Enunciate mechanism.

Returns:
The version of the Enunciate mechanism.

isJavacCheck

public boolean isJavacCheck()
Whether to do a javac check before invoking the Enunciate mechanism.

Returns:
Whether to do a javac check before invoking the Enunciate mechanism.

setJavacCheck

public void setJavacCheck(boolean javacCheck)
Whether to do a javac check before invoking the Enunciate mechanism.

Parameters:
javacCheck - Whether to do a javac check before invoking the Enunciate mechanism.

isCompileDebugInfo

public boolean isCompileDebugInfo()
Whether to compile with debug info.

Returns:
Whether to compile with debug info.

setCompileDebugInfo

public void setCompileDebugInfo(boolean compileDebugInfo)
Whether to compile with debug info.

Parameters:
compileDebugInfo - Whether to compile with debug info.

getConfigFile

public java.io.File getConfigFile()
The enunciate config file.

Returns:
The enunciate config file.

setConfigFile

public void setConfigFile(java.io.File configFile)
The enunciate config file.

Parameters:
configFile - The enunciate config file.

getCompileDir

public java.io.File getCompileDir()
The destination directory for the compiled classes.

Returns:
The destination directory for the compiled classes.

setCompileDir

public void setCompileDir(java.io.File compileDir)
The destination directory for the compiled classes.

Parameters:
compileDir - The destination directory for the compiled classes.

getBuildDir

public java.io.File getBuildDir()
The directory to use to build the war.

Returns:
The directory to use to build the war.

setBuildDir

public void setBuildDir(java.io.File buildDir)
The directory to use to build the war.

Parameters:
buildDir - The directory to use to build the war.

getPackageDir

public java.io.File getPackageDir()
The package directory.

Returns:
The package directory.

setPackageDir

public void setPackageDir(java.io.File packageDir)
The package directory.

Parameters:
packageDir - The package directory.

getScratchDir

public java.io.File getScratchDir()
A scratch directory for Enunciate to use.

Returns:
A scratch directory for Enunciate to use.

setScratchDir

public void setScratchDir(java.io.File scratchDir)
A scratch directory for Enunciate to use.

Parameters:
scratchDir - A scratch directory for Enunciate to use.

getGenerateDir

public java.io.File getGenerateDir()
The preprocessor directory (-s).

Returns:
The preprocessor directory (-s).

setGenerateDir

public void setGenerateDir(java.io.File generateDir)
The preprocessor directory (-s).

Parameters:
generateDir - The preprocessor directory (-s).

getRuntimeClasspath

public java.lang.String getRuntimeClasspath()
The runtime classpath.

Returns:
The runtime classpath.

setRuntimeClasspath

public void setRuntimeClasspath(java.lang.String runtimeClasspath)
The runtime classpath.

Parameters:
runtimeClasspath - The runtime classpath.

getBuildClasspath

public java.lang.String getBuildClasspath()
The build classpath.

Returns:
The build classpath.

setBuildClasspath

public void setBuildClasspath(java.lang.String buildClasspath)
The build classpath.

Parameters:
buildClasspath - The build classpath.

getTarget

public Enunciate.Target getTarget()
The target.

Returns:
The target.

setTarget

public void setTarget(Enunciate.Target target)
The target.

Parameters:
target - The target.

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object value)
Set a property value.

Parameters:
property - The property.
value - The value.

getArtifacts

public java.util.Set<Artifact> getArtifacts()
The artifacts exportable by enunciate.

Returns:
The artifacts exportable by enunciate.

findArtifact

public Artifact findArtifact(java.lang.String artifactId)
Finds the artifact of the given id.

Parameters:
artifactId - The id of the artifact.
Returns:
The artifact, or null if the artifact wasn't found.

addArtifact

public boolean addArtifact(Artifact artifact)
Adds the specified artifact.

Parameters:
artifact - The artifact to add.
Returns:
Whether the artifact was successfully added.

addWebAppFragment

public void addWebAppFragment(WebAppFragment fragment)
Add a webapp fragment for Enunciate to process.

Parameters:
fragment - The fragment.

addClasspathHandler

public void addClasspathHandler(ClasspathHandler handler)
Add a classpath handler.

Parameters:
handler - The classpath handler.

getWebAppFragments

public java.util.Set<WebAppFragment> getWebAppFragments()
The webapp fragments.

Returns:
The webapp fragments.

addAdditionalSourceRoot

public void addAdditionalSourceRoot(java.io.File root)
Add an additional source root for Enunciate to process.

Parameters:
root - The source root directory.

getAdditionalSourceRoots

public java.util.Set<java.io.File> getAdditionalSourceRoots()
The additional source roots.

Returns:
The additional source roots.

addExport

public void addExport(java.lang.String artifactId,
                      java.io.File destination)
Adds an export.

Parameters:
artifactId - The id of the artifact to export.
destination - The file or directory to export the artifact to.

getProperty

public java.lang.Object getProperty(java.lang.String property)
Get a property value.

Parameters:
property - The property whose value to retrieve.
Returns:
The property value.

getConfig

public EnunciateConfiguration getConfig()
Returns:
The configuration.

isModuleEnabled

public boolean isModuleEnabled(java.lang.String moduleName)
Whether the specified module is enabled.

Parameters:
moduleName - The name of the module.
Returns:
Whether the module is enabled.

setConfig

public void setConfig(EnunciateConfiguration config)
Set the configuration for the mechanism.

Parameters:
config - The configuration.