Full name:

net.sourceforge.czt.dev:gnast-maven-plugin:1.6-SNAPSHOT:generate

Description:

Goal which generates AST classes from XML Schema files using GnAST.

The source XML Schema files can be provided by indicating a source directory or explicitly listing the paths.

The template and schema paths can be indicated as filesystem paths, URLs, or classpath resources. Refer to Plexus ResourceManager for more details.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
targetNamespace String - The namespace (as indicated in XML Schema file) to generate AST files for.
User property is: gnast.targetNamespace.
templates List - The list of Velocity template directory paths.

The files in template paths can be used in GnAST Velocity templates to drive AST generation.

Potential values are filesystem paths, URLs, or classpath resources. This parameter is resolved as resource, URL, then file.


Optional Parameters

Name Type Since Description
addAstFinaliser Boolean - Add AST finalisers to count finalised AST objects (e.g. for metrics)
User property is: gnast.addAstFinaliser.
mappingFileLocation String - The file defining mappings between XML Schema types and Java types. Follows Java Properties file format, e.g. anyURI = String.
Default value is: mapping.properties.
User property is: gnast.mappingFileLocation.
outputDirectory File - The directory where GnAST should generate AST files.
Default value is: ${project.build.directory}/generated-sources/gnast.
User property is: gnast.outputDirectory.
sourceDirectory File - The directory where all XML schema source files are located.

At least one of sourceDirectory or sourceSchemas must be set to find the schemas.


User property is: gnast.sourceDirectory.
sourceSchemas List - An explicit list of XML schema source files to use in generation.

Potential values are a filesystem path, a URL, or a classpath resource. This parameter is resolved as resource, URL, then file.

At least one of sourceDirectory or sourceSchemas must be set to find the schemas.


verbose boolean - Sets whether the plugin runs in verbose mode.
Default value is: false.
User property is: gnast.verbose.

Parameter Details

addAstFinaliser:

Add AST finalisers to count finalised AST objects (e.g. for metrics)
  • Type: java.lang.Boolean
  • Required: No
  • User Property: gnast.addAstFinaliser

mappingFileLocation:

The file defining mappings between XML Schema types and Java types. Follows Java Properties file format, e.g. anyURI = String.
  • Type: java.lang.String
  • Required: No
  • User Property: gnast.mappingFileLocation
  • Default: mapping.properties

outputDirectory:

The directory where GnAST should generate AST files.
  • Type: java.io.File
  • Required: No
  • User Property: gnast.outputDirectory
  • Default: ${project.build.directory}/generated-sources/gnast

sourceDirectory:

The directory where all XML schema source files are located.

At least one of sourceDirectory or sourceSchemas must be set to find the schemas.

  • Type: java.io.File
  • Required: No
  • User Property: gnast.sourceDirectory

sourceSchemas:

An explicit list of XML schema source files to use in generation.

Potential values are a filesystem path, a URL, or a classpath resource. This parameter is resolved as resource, URL, then file.

At least one of sourceDirectory or sourceSchemas must be set to find the schemas.

  • Type: java.util.List
  • Required: No

targetNamespace:

The namespace (as indicated in XML Schema file) to generate AST files for.
  • Type: java.lang.String
  • Required: Yes
  • User Property: gnast.targetNamespace

templates:

The list of Velocity template directory paths.

The files in template paths can be used in GnAST Velocity templates to drive AST generation.

Potential values are filesystem paths, URLs, or classpath resources. This parameter is resolved as resource, URL, then file.

  • Type: java.util.List
  • Required: Yes

verbose:

Sets whether the plugin runs in verbose mode.
  • Type: boolean
  • Required: No
  • User Property: gnast.verbose
  • Default: false

Back to top

Version: 1.6-SNAPSHOT. Last Published: 2016-04-09.

Reflow Maven skin by Andrius Velykis.