Class JJTreeMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.javacc.AbstractPreprocessorMojo
org.codehaus.mojo.javacc.JJTreeMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="jjtree",
defaultPhase=GENERATE_SOURCES,
threadSafe=true)
public class JJTreeMojo
extends AbstractPreprocessorMojo
Deprecated.
Parses a JJTree grammar file (
*.jjt
) and transforms it to Java source files and a JavaCC grammar
file. Please see the JJTree Reference Documentation for
more information.- Since:
- 2.0
- Author:
- jesse jesse.mcconnell@gmail.com
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Deprecated.Prevents registration of our output or a following invocation of the javacc mojo will cause duplicate sources which in turn will make compilation fail.protected String[]
Deprecated.Gets a set of Ant-like exclusion patterns used to unselect files from the source directory for processing.protected String[]
Deprecated.Gets a set of Ant-like inclusion patterns used to select files from the source directory for processing.protected File
Deprecated.Gets the absolute path to the directory where the generated Java files for the parser will be stored.protected File
Deprecated.Gets the absolute path to the directory where the grammar files are located.protected int
Deprecated.Gets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation.protected File
Deprecated.Gets the absolute path to the directory where the processed input files will be stored for later detection of stale sources.protected org.codehaus.mojo.javacc.JJTree
Deprecated.Creates a new facade to invoke JJTree.protected void
processGrammar
(org.codehaus.mojo.javacc.GrammarInfo grammarInfo) Deprecated.Passes the specified grammar file through the tool.Methods inherited from class org.codehaus.mojo.javacc.AbstractPreprocessorMojo
createTimestamp, execute
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
JJTreeMojo
public JJTreeMojo()Deprecated.
-
-
Method Details
-
getSourceDirectory
Deprecated.Gets the absolute path to the directory where the grammar files are located.- Specified by:
getSourceDirectory
in classAbstractPreprocessorMojo
- Returns:
- The absolute path to the directory where the grammar files are located, never
null
.
-
getIncludes
Deprecated.Gets a set of Ant-like inclusion patterns used to select files from the source directory for processing.- Specified by:
getIncludes
in classAbstractPreprocessorMojo
- Returns:
- A set of Ant-like inclusion patterns used to select files from the source directory for processing, can
be
null
if all files should be included.
-
getExcludes
Deprecated.Gets a set of Ant-like exclusion patterns used to unselect files from the source directory for processing.- Specified by:
getExcludes
in classAbstractPreprocessorMojo
- Returns:
- A set of Ant-like inclusion patterns used to unselect files from the source directory for processing, can
be
null
if no files should be excluded.
-
getOutputDirectory
Deprecated.Gets the absolute path to the directory where the generated Java files for the parser will be stored.- Specified by:
getOutputDirectory
in classAbstractPreprocessorMojo
- Returns:
- The absolute path to the directory where the generated Java files for the parser will be stored, never
null
.
-
getTimestampDirectory
Deprecated.Gets the absolute path to the directory where the processed input files will be stored for later detection of stale sources.- Specified by:
getTimestampDirectory
in classAbstractPreprocessorMojo
- Returns:
- The absolute path to the directory where the processed input files will be stored for later detection of
stale sources, never
null
.
-
getStaleMillis
protected int getStaleMillis()Deprecated.Gets the granularity in milliseconds of the last modification date for testing whether a source needs recompilation.- Specified by:
getStaleMillis
in classAbstractPreprocessorMojo
- Returns:
- The granularity in milliseconds of the last modification date for testing whether a source needs recompilation.
-
processGrammar
protected void processGrammar(org.codehaus.mojo.javacc.GrammarInfo grammarInfo) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException Deprecated.Passes the specified grammar file through the tool.- Specified by:
processGrammar
in classAbstractPreprocessorMojo
- Parameters:
grammarInfo
- The grammar info describing the grammar file to process, must not benull
.- Throws:
org.apache.maven.plugin.MojoExecutionException
- If the invocation of the tool failed.org.apache.maven.plugin.MojoFailureException
- If the tool reported a non-zero exit code.
-
newJJTree
protected org.codehaus.mojo.javacc.JJTree newJJTree()Deprecated.Creates a new facade to invoke JJTree. Most options for the invocation are derived from the current values of the corresponding mojo parameters. The caller is responsible to set the input file, output directory and package on the returned facade.- Returns:
- The facade for the tool invocation, never
null
.
-
addCompileSourceRoot
protected void addCompileSourceRoot()Deprecated.Prevents registration of our output or a following invocation of the javacc mojo will cause duplicate sources which in turn will make compilation fail.- Overrides:
addCompileSourceRoot
in classAbstractPreprocessorMojo
-
jjtree-javacc
goal instead.