Package org.codehaus.modello.maven
Class ModelloXsdMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.modello.maven.AbstractModelloGeneratorMojo
org.codehaus.modello.maven.ModelloXsdMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="xsd",
defaultPhase=GENERATE_SOURCES,
threadSafe=true)
public class ModelloXsdMojo
extends AbstractModelloGeneratorMojo
Creates an XML schema from the model.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Boolean flag to enforce mandatory elements in the XML schema.private File
The output directory of the generated XML Schema.private String
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
customizeParameters
(Properties parameters) Override this method to customize the values in the properties set.protected String
protected boolean
void
setOutputDirectory
(File outputDirectory) Methods inherited from class org.codehaus.modello.maven.AbstractModelloGeneratorMojo
createParameters, execute, getBasedir, getModelloCore, getModels, getPackageWithVersion, getProject, getVersion, producesResources, setBasedir, setBuildContext, setModelloCore, setModels, setPackagedVersions, setPackageWithVersion, setProject, setVersion
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
outputDirectory
@Parameter(defaultValue="${project.build.directory}/generated-site/resources/xsd", required=true) private File outputDirectoryThe output directory of the generated XML Schema. -
enforceMandatoryElements
@Parameter(defaultValue="false") private boolean enforceMandatoryElementsBoolean flag to enforce mandatory elements in the XML schema. If set tofalse
the XSD won't enforce mandatory elements in the XML which can be useful if the XML is post processed (e.g. POM merging with parents). The default value isfalse
for backwards compatibility reasons, but should be set totrue
for most cases.- Since:
- 2.1.0
-
xsdFileName
- Since:
- 1.0-alpha-21
-
-
Constructor Details
-
ModelloXsdMojo
public ModelloXsdMojo()
-
-
Method Details
-
getGeneratorType
- Specified by:
getGeneratorType
in classAbstractModelloGeneratorMojo
-
customizeParameters
Description copied from class:AbstractModelloGeneratorMojo
Override this method to customize the values in the properties set.This method will be called after the parameters have been populated with the parameters in the abstract mojo.
- Overrides:
customizeParameters
in classAbstractModelloGeneratorMojo
- Parameters:
parameters
- the parameters to customize
-
producesCompilableResult
protected boolean producesCompilableResult()- Overrides:
producesCompilableResult
in classAbstractModelloGeneratorMojo
-
getOutputDirectory
- Specified by:
getOutputDirectory
in classAbstractModelloGeneratorMojo
-
setOutputDirectory
-