Class AbstractModelloGeneratorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.modello.maven.AbstractModelloGeneratorMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractModelloSourceGeneratorMojo, ModelloJsonSchemaGeneratorMojo, ModelloVelocityMojo, ModelloXdocMojo, ModelloXsdMojo
public abstract class AbstractModelloGeneratorMojo
extends org.apache.maven.plugin.AbstractMojo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringBase directory of the project, from where the Modello models are loaded.private org.codehaus.plexus.build.BuildContextprivate FileThe file that contains license header text.private StringThe contents of license header text, verbatim.private org.codehaus.modello.core.ModelloCoreNote: This is passed by Maven and must not be configured by the user.private String[]List of relative paths to mdo files containing the models.Additional historical versions to generate, each being packaged with the version regardless of thepackageWithVersionsetting.private booleanTrue if the generated package names should include the version.Additional exceptions to the singularization rules, changing plural noun to singular.private org.apache.maven.project.MavenProjectThe Maven project instance for the executing project.private StringThe version of the model we will be working on.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a Properties objects.protected voidcustomizeParameters(Map<String, Object> parameters) Override this method to customize the values in the properties set.private voidPerforms execute on a single specified model.voidexecute()protected abstract Stringorg.codehaus.modello.core.ModelloCoreString[]abstract Filebooleanorg.apache.maven.project.MavenProjectprotected booleanprotected booleanvoidsetBasedir(String basedir) voidsetBuildContext(org.codehaus.plexus.build.BuildContext context) voidsetModelloCore(org.codehaus.modello.core.ModelloCore modelloCore) voidvoidsetPackagedVersions(List<String> packagedVersions) voidsetPackageWithVersion(boolean packageWithVersion) voidsetProject(org.apache.maven.project.MavenProject project) voidsetVersion(String version) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
basedir
Base directory of the project, from where the Modello models are loaded. -
models
List of relative paths to mdo files containing the models. -
version
The version of the model we will be working on. -
packageWithVersion
@Parameter(property="packageWithVersion", defaultValue="false", required=true) private boolean packageWithVersionTrue if the generated package names should include the version. -
modelloCore
@Component private org.codehaus.modello.core.ModelloCore modelloCoreNote: This is passed by Maven and must not be configured by the user.
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) private org.apache.maven.project.MavenProject projectThe Maven project instance for the executing project. -
packagedVersions
-
licenseText
-
licenseFile
The file that contains license header text. If both configured, thelicenseTextprevails.- Since:
- 2.3.1
-
pluralExceptions
-
buildContext
@Component private org.codehaus.plexus.build.BuildContext buildContext- Since:
- 1.0.1
-
-
Constructor Details
-
AbstractModelloGeneratorMojo
public AbstractModelloGeneratorMojo()
-
-
Method Details
-
getGeneratorType
-
getOutputDirectory
-
producesCompilableResult
protected boolean producesCompilableResult() -
producesResources
protected boolean producesResources() -
createParameters
-
customizeParameters
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
doExecute
-
getBasedir
-
setBasedir
-
getVersion
-
setVersion
-
getPackageWithVersion
public boolean getPackageWithVersion() -
setPackageWithVersion
public void setPackageWithVersion(boolean packageWithVersion) -
getModelloCore
public org.codehaus.modello.core.ModelloCore getModelloCore() -
setModelloCore
public void setModelloCore(org.codehaus.modello.core.ModelloCore modelloCore) -
setBuildContext
public void setBuildContext(org.codehaus.plexus.build.BuildContext context) -
getProject
public org.apache.maven.project.MavenProject getProject() -
setProject
public void setProject(org.apache.maven.project.MavenProject project) -
setPackagedVersions
-
getModels
- Returns:
- Returns the paths to the models.
-
setModels
- Parameters:
models- Sets the paths to the models.
-