Class AbstractAntlrMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.antlr.AbstractAntlrMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, Environment
- Direct Known Subclasses:
AntlrHtmlReport, AntlrPlugin
public abstract class AbstractAntlrMojo
extends org.apache.maven.plugin.AbstractMojo
implements Environment
Base class with majority of Antlr functionalities.
- Version:
- $Id: AbstractAntlrMojo.java 13111 2010-11-16 22:16:36Z pgier $
- Author:
- Vincent Siveton
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Grammar[]Grammar list presents in thesourceDirectorydirectory.protected StringComma separated grammar file names or grammar pattern file names present in thesourceDirectorydirectory.protected FileSpecifies the destination directory where Antlr should generate files.protected org.apache.maven.project.MavenProjectThe Maven Project Objectprotected FileSpecifies the Antlr directory containing grammar files.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidConvenience method to add an argumentprotected abstract voidAdd arguments to be included in Antlr callprotected voidprotected final org.apache.maven.artifact.Artifactprotected voidperformGeneration(GenerationPlan plan, org.apache.maven.artifact.Artifact antlrArtifact) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Environment
getLogMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
sourceDirectory
Specifies the Antlr directory containing grammar files. -
project
@Parameter(property="project", readonly=true) protected org.apache.maven.project.MavenProject projectThe Maven Project Object -
outputDirectory
@Parameter(defaultValue="${project.build.directory}/generated-sources/antlr") protected File outputDirectorySpecifies the destination directory where Antlr should generate files.
See Command Line Options -
grammars
Comma separated grammar file names or grammar pattern file names present in thesourceDirectorydirectory.
See Command Line Options -
grammarDefs
Grammar list presents in thesourceDirectorydirectory.
See Command Line Options
Example:<grammarDefs>
<grammar>
<name>myGrammar.g</name>
<glib>mySuperGrammar.g;myOtherSuperGrammar.g</glib>
</grammar>
</grammarDefs>
-
-
Constructor Details
-
AbstractAntlrMojo
public AbstractAntlrMojo()
-
-
Method Details
-
getSourceDirectory
- Specified by:
getSourceDirectoryin interfaceEnvironment
-
getOutputDirectory
- Specified by:
getOutputDirectoryin interfaceEnvironment
-
executeAntlr
protected void executeAntlr() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
locateAntlrArtifact
protected final org.apache.maven.artifact.Artifact locateAntlrArtifact() throws AbstractAntlrMojo.NoAntlrDependencyDefinedException -
performGeneration
protected void performGeneration(GenerationPlan plan, org.apache.maven.artifact.Artifact antlrArtifact) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
addArgs
Add arguments to be included in Antlr call- Parameters:
arguments-
-
addArgIf
-