Package com.fizzed.rocker.maven
Class GenerateMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.fizzed.rocker.maven.GenerateMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="generate",
defaultPhase=GENERATE_SOURCES,
threadSafe=true,
requiresDependencyResolution=COMPILE)
public class GenerateMojo
extends org.apache.maven.plugin.AbstractMojo
Maven plugin for parsing Rocker templates and generating Java source code.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected FileDirectory where classes are compiled to (for placing rocker config file).protected Booleanprotected Stringprotected Stringprotected booleanprotected Stringprotected BooleanWeather or not to mark the generated classes as@Generated.protected Booleanprotected FileDirectory to output generated Java source files.protected PlainTextStrategyprotected String[]protected org.apache.maven.project.MavenProjectprivate booleanprotected booleanprotected Stringprotected Stringprotected FileDirectory containing templates.protected StringFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
skip
@Parameter(property="rocker.skip", defaultValue="false") private boolean skip -
failOnError
@Parameter(property="rocker.failOnError", defaultValue="true") protected boolean failOnError -
skipTouch
@Parameter(property="rocker.skipTouch", defaultValue="false") protected boolean skipTouch -
touchFile
@Parameter(property="rocker.touchFile", defaultValue="${basedir}/pom.xml") protected String touchFile -
addAsSources
@Parameter(property="rocker.addAsSources", defaultValue="true") protected boolean addAsSources -
addAsTestSources
@Parameter(property="rocker.addAsTestSources", defaultValue="false") protected boolean addAsTestSources -
javaVersion
-
extendsClass
-
extendsModelClass
-
optimize
-
discardLogicWhitespace
-
targetCharset
-
suffixRegex
-
templateDirectory
@Parameter(property="rocker.templateDirectory", defaultValue="${project.build.sourceDirectory}") protected File templateDirectoryDirectory containing templates. The base directory to search -- which is also how their "package" name is determined. -
outputDirectory
@Parameter(property="rocker.outputDirectory", defaultValue="${project.build.directory}/generated-sources/rocker", required=true) protected File outputDirectoryDirectory to output generated Java source files. -
classDirectory
@Parameter(property="rocker.classDirectory", defaultValue="${project.build.outputDirectory}", required=true) protected File classDirectoryDirectory where classes are compiled to (for placing rocker config file). -
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project -
postProcessing
-
plainTextStrategy
@Parameter(property=" rocker.plainTextStrategy", required=false, defaultValue="STATIC_BYTE_ARRAYS_VIA_UNLOADED_CLASS") protected PlainTextStrategy plainTextStrategy -
markAsGenerated
Weather or not to mark the generated classes as@Generated.
-
-
Constructor Details
-
GenerateMojo
public GenerateMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-