Package org.appng.maven.plugin.mojo
Class GenerateMessageConstantsMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.appng.maven.plugin.mojo.GenerateMessageConstantsMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="generateMessageConstants", defaultPhase=GENERATE_SOURCES, requiresDependencyResolution=COMPILE, requiresProject=true) public class GenerateMessageConstantsMojo extends org.apache.maven.plugin.AbstractMojo
-
-
Field Summary
Fields Modifier and Type Field Description protected org.sonatype.plexus.build.incremental.BuildContext
buildContext
protected File
filePath
the path to the source fileprotected File
outfolder
the output-folder for the generated classprotected boolean
skip
skips the executionprotected String
targetClass
the fully qualified name of the target class to generate
-
Constructor Summary
Constructors Constructor Description GenerateMessageConstantsMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createConstantClass()
void
execute()
protected String[]
getArgs()
protected String
getMessage()
protected boolean
needsToBeExecuted()
-
-
-
Field Detail
-
filePath
@Parameter(property="filePath", required=true) protected File filePath
the path to the source file
-
targetClass
@Parameter(property="targetClass", required=true) protected String targetClass
the fully qualified name of the target class to generate
-
outfolder
@Parameter(property="outFolder", defaultValue="target/generated-sources/constants", required=false) protected File outfolder
the output-folder for the generated class
-
skip
@Parameter(property="skip", defaultValue="false", required=false) protected boolean skip
skips the execution
-
buildContext
@Component protected org.sonatype.plexus.build.incremental.BuildContext buildContext
-
-
Method Detail
-
createConstantClass
protected void createConstantClass() throws IOException
- Throws:
IOException
-
getMessage
protected String getMessage()
-
getArgs
protected String[] getArgs()
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
needsToBeExecuted
protected boolean needsToBeExecuted()
-
-