@Mojo(name="generate",
defaultPhase=GENERATE_SOURCES,
threadSafe=true)
public class GenerateMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
className
Name of Version class to generate.
|
protected String |
javaPackage
Package name of Version class file.
|
protected File |
outputDirectory
Directory to output generated Java source file
|
protected org.apache.maven.project.MavenProject |
project |
protected String |
versionCommit
Commit of project for Version class (such as git hash, usually produced from another plugin).
|
protected String |
versionName
Name of build for Version class (artifactId is usually best).
|
protected String |
versionTimestamp
Timestamp of build for Version class.
|
protected Long |
versionTimestampMillis
Timestamp of build for Version class.
|
protected String |
versionVendor
Vendor of build for Version class (groupId is usually best).
|
protected String |
versionVersion
Version of build for Version class.
|
| Constructor and Description |
|---|
GenerateMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
@Parameter(property="outputDirectory",
alias="versionizer.outputDirectory",
defaultValue="${project.build.directory}/generated-sources/versionizer",
required=true)
protected File outputDirectory
@Parameter(property="javaPackage",
alias="versionizer.javaPackage",
defaultValue="")
protected String javaPackage
@Parameter(property="className",
alias="versionizer.className",
defaultValue="Version",
required=true)
protected String className
@Parameter(property="versionCommit",
alias="versionizer.commit",
defaultValue="unknown",
required=false)
protected String versionCommit
@Parameter(property="versionTimestampMillis",
alias="versionizer.timestampMillis",
defaultValue="",
required=false)
protected Long versionTimestampMillis
@Parameter(property="versionTimestamp",
alias="versionizer.timestamp",
defaultValue="",
required=false)
protected String versionTimestamp
@Parameter(property="versionVersion",
alias="versionizer.version",
defaultValue="${project.version}",
required=true)
protected String versionVersion
@Parameter(property="versionName",
alias="versionizer.name",
defaultValue="${project.artifactId}",
required=true)
protected String versionName
@Parameter(property="versionVendor",
alias="versionizer.vendor",
defaultValue="${project.groupId}",
required=true)
protected String versionVendor
@Parameter(defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
Copyright © 2015 Fizzed Inc. All rights reserved.