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 booleanBoolean flag to enforce mandatory elements in the XML schema.private FileThe output directory of the generated XML Schema.private StringFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcustomizeParameters(Properties parameters) Override this method to customize the values in the properties set.protected Stringprotected booleanvoidsetOutputDirectory(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, setVersionMethods 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 tofalsethe 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 isfalsefor backwards compatibility reasons, but should be set totruefor most cases.- Since:
- 2.1.0
-
xsdFileName
- Since:
- 1.0-alpha-21
-
-
Constructor Details
-
ModelloXsdMojo
public ModelloXsdMojo()
-
-
Method Details
-
getGeneratorType
- Specified by:
getGeneratorTypein classAbstractModelloGeneratorMojo
-
customizeParameters
Description copied from class:AbstractModelloGeneratorMojoOverride 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:
customizeParametersin classAbstractModelloGeneratorMojo- Parameters:
parameters- the parameters to customize
-
producesCompilableResult
protected boolean producesCompilableResult()- Overrides:
producesCompilableResultin classAbstractModelloGeneratorMojo
-
getOutputDirectory
- Specified by:
getOutputDirectoryin classAbstractModelloGeneratorMojo
-
setOutputDirectory
-