diff --git a/modello-plugins/modello-plugin-velocity/src/site/markdown/index.md b/modello-plugins/modello-plugin-velocity/src/site/markdown/index.md new file mode 100644 index 000000000..4fd97f453 --- /dev/null +++ b/modello-plugins/modello-plugin-velocity/src/site/markdown/index.md @@ -0,0 +1,24 @@ +--- +title: Modello Velocity Plugin +author: Guillaume Nodet +--- + +# Modello Velocity Plugin + +Modello Velocity Plugin generates files from the Modello model using [Velocity templates](https://velocity.apache.org/engine/2.3/vtl-reference.html). + +# Velocity Processing + +The plugin is configured with a list of `template` files to evaluate, rfelative to `velocityBasedir` (which defaults to Maven's `${project.basedir}`). + +During template evaluation, `#MODELLO-VELOCITY#SAVE-OUTPUT-TO {relative path to file}` pseudo macro is available to send the rendered content to a file. + +The Velocity context contains some variables related to the Modello model context that you can use: + +| Variable | Type | Description | +|---|---|---| +| parameters configured in the plugin | `String` | The parameters values configured in the plugin as `{key}={value}`. | +| `version` | `String` | The version of the model being used. | +| `model` | [`Model`](../../modello-core/apidocs/org/codehaus/modello/model/package-summary.html) | The Modello model. | +| `Helper` | [`Helper`](apidocs/org/codehaus/modello/plugin/velocity/Helper.html) | A helper tool with classical functions useful to generate content from a Modello model API. | +| `template` | `String` | the template that is being evaluated. | diff --git a/modello-plugins/modello-plugin-velocity/src/site/xdoc/index.xml b/modello-plugins/modello-plugin-velocity/src/site/xdoc/index.xml deleted file mode 100644 index df3885287..000000000 --- a/modello-plugins/modello-plugin-velocity/src/site/xdoc/index.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Modello Velocity Plugin - Guillaume Nodet - - - - -
- -

Modello Velocity Plugin generates files from the Modello model using Velocity templates.

- -
- -
- -

The plugin is configured with a list of template files to evaluate, rfelative to velocityBasedir (which defaults to Maven's ${project.basedir}).

-

During template evaluation, #MODELLO-VELOCITY#SAVE-OUTPUT-TO {relative path to file} pseudo macro is available to send the rendered content to a file.

-

The Velocity context contains some variables related to the Modello model context that you can use: - - - - - - - - - - - - - - - - - -
VariableTypeDescription
parameters configured in the pluginStringThe parameters values configured in the plugin as {key}={value}.
versionStringThe version of the model being used.
modelModelThe Modello model.
HelperHelperA helper tool with classical functions useful to generate content from a Modello model API.
templateStringthe template that is being evaluated.
-

-
- - - -
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md new file mode 100644 index 000000000..9c9688c65 --- /dev/null +++ b/src/site/markdown/index.md @@ -0,0 +1,36 @@ +--- +title: Modello +author: Hervé Boutemy +--- + +# Modello + +Modello is a framework for code generation from a simple model. +Modello generates code from a [simple model format](modello.html): based on a plugin architecture, various types of code and +descriptors can be generated from the single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, XSD, JSON Schema +and documentation. +Starting with 2.1.0, content can even be [generated from Velocity templates](modello-plugins/modello-plugin-velocity/) for maximum flexibility. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml deleted file mode 100644 index b55e3db1d..000000000 --- a/src/site/xdoc/index.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Modello - Hervé Boutemy - - - - -
- -

Modello is a framework for code generation from a simple model. - Modello generates code from a simple model format: based on a plugin architecture, various types of code and - descriptors can be generated from the single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, XSD, JSON Schema - and documentation. - Starting with 2.1.0, content can even be generated from Velocity templates for maximum flexibility. -

- -

- - - - - - - - - - - - - - - - - - - - - - - -

- -
- - - -