public abstract class AbstractAntlrMojo extends org.apache.maven.plugin.AbstractMojo implements Environment
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractAntlrMojo.NoAntlrDependencyDefinedException |
| Modifier and Type | Field and 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 and Description |
|---|
AbstractAntlrMojo() |
| Modifier and Type | Method and 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, setPluginContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLogprotected 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 Environmentpublic File getOutputDirectory()
getOutputDirectory in interface Environmentprotected void executeAntlr()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected 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.MojoExecutionExceptionprotected abstract void addArgs(List arguments)
arguments - Copyright © 2004–2025 MojoHaus. All rights reserved.