public abstract class AbstractWizardMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
entityAliases
The entity aliases.
|
protected List<org.apache.maven.shared.model.fileset.FileSet> |
filesets
The list of file sets containing the model.
If set, the modelDir is ignored. |
protected String |
modelDefaults
The model defaults.
|
protected File |
modelDir
Directory holding the model files to be processed.
Ignored if fileset explicitly given. |
| Constructor and Description |
|---|
AbstractWizardMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,PackageInfo> |
createPackageMap()
Creates a map of package names to package infos.
|
void |
execute() |
protected EntityAliases |
getEntityAliases()
Gets the entity aliases.
|
protected ModelDefaults |
getModelDefaults()
Gets the model defaults.
|
<T extends Profile> |
getProfiles(Class<T> clazz)
Gets the profiles.
|
File |
getStatusDir()
Gets the status directory.
|
File |
getTemplateDir()
Gets the template directory.
|
protected void |
installTemplates()
Copies the templates to the template directory.
Overwrites any existing templates. |
protected void |
loadModel()
Loads the model.
|
protected int |
processFileSet(org.apache.maven.shared.model.fileset.FileSet fileSet)
Processes a fileset to load the model.
|
protected void |
validate()
Validates the configuration.
|
@Parameter(defaultValue="${project.build.directory}/wurbel/model",
property="tentackle.modelDir")
protected File modelDir
@Parameter(property="tentackle.modelDefaults") protected String modelDefaults
@Parameter(property="tentackle.entityAliases") protected String entityAliases
@Parameter protected List<org.apache.maven.shared.model.fileset.FileSet> filesets
public <T extends Profile> List<T> getProfiles(Class<T> clazz) throws org.apache.maven.plugin.MojoExecutionException
T - the profile typeclazz - the concrete profile classorg.apache.maven.plugin.MojoExecutionException - if profile names are not uniquepublic File getTemplateDir()
public File getStatusDir()
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected ModelDefaults getModelDefaults() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if parsing the model defaults failedprotected EntityAliases getEntityAliases() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if parsing the aliases failedprotected void loadModel()
throws org.apache.maven.plugin.MojoFailureException,
org.apache.maven.plugin.MojoExecutionException
Notice: the model is only needed by the PdoMojo, but we configure it for the whole plugin.
org.apache.maven.plugin.MojoFailureException - if the model is inconsistentorg.apache.maven.plugin.MojoExecutionException - if loading failed due to some other errorprotected int processFileSet(org.apache.maven.shared.model.fileset.FileSet fileSet)
throws org.apache.maven.plugin.MojoExecutionException
fileSet - the fileset containing the modelorg.apache.maven.plugin.MojoExecutionException - if model defaults or entity aliases could not be determinedprotected void validate()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if project not set or misconfiguredprotected void installTemplates()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if failedprotected Map<String,PackageInfo> createPackageMap() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if split package detectedTentackle - distributed, domain- and model-driven