Environment
AntlrHtmlReport
, AntlrPlugin
public abstract class AbstractAntlrMojo extends org.apache.maven.plugin.AbstractMojo implements Environment
Modifier and Type | Class | Description |
---|---|---|
static class |
AbstractAntlrMojo.NoAntlrDependencyDefinedException |
Modifier and Type | Field | Description |
---|---|---|
protected Grammar[] |
grammarDefs |
Grammar list presents in the
sourceDirectory directory. |
protected String |
grammars |
Comma separated grammar file names or grammar pattern file names present in the
sourceDirectory
directory. |
protected File |
outputDirectory |
Specifies the destination directory where Antlr should generate files.
|
protected org.apache.maven.project.MavenProject |
project |
The Maven Project Object
|
protected File |
sourceDirectory |
Specifies the Antlr directory containing grammar files.
|
Constructor | Description |
---|---|
AbstractAntlrMojo() |
Modifier and Type | Method | Description |
---|---|---|
protected static void |
addArgIf(List arguments,
boolean b,
String value) |
Convenience method to add an argument
|
protected abstract void |
addArgs(List arguments) |
Add arguments to be included in Antlr call
|
protected void |
executeAntlr() |
|
File |
getOutputDirectory() |
|
File |
getSourceDirectory() |
|
protected org.apache.maven.artifact.Artifact |
locateAntlrArtifact() |
|
protected void |
performGeneration(GenerationPlan plan,
org.apache.maven.artifact.Artifact antlrArtifact) |
getLog, getPluginContext, setLog, setPluginContext
getLog
protected File sourceDirectory
protected org.apache.maven.project.MavenProject project
protected File outputDirectory
protected String grammars
sourceDirectory
directory. protected Grammar[] grammarDefs
sourceDirectory
directory. <grammarDefs>
<grammar>
<name>myGrammar.g</name>
<glib>mySuperGrammar.g;myOtherSuperGrammar.g</glib>
</grammar>
</grammarDefs>
public File getSourceDirectory()
getSourceDirectory
in interface Environment
public File getOutputDirectory()
getOutputDirectory
in interface Environment
protected void executeAntlr() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected final org.apache.maven.artifact.Artifact locateAntlrArtifact() throws AbstractAntlrMojo.NoAntlrDependencyDefinedException
protected void performGeneration(GenerationPlan plan, org.apache.maven.artifact.Artifact antlrArtifact) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract void addArgs(List arguments)
arguments
- Copyright © 2004–2019 MojoHaus. All rights reserved.