Skip to content

Commit f9ce870

Browse files
committed
add documentation
1 parent 92c6a1d commit f9ce870

6 files changed

Lines changed: 49 additions & 22 deletions

File tree

modello-plugins/modello-plugin-velocity/src/main/site/xdoc/index.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

modello-plugins/modello-plugin-velocity/src/main/site/site.xml renamed to modello-plugins/modello-plugin-velocity/src/site/site.xml

File renamed without changes.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0"?>
2+
3+
<document>
4+
5+
<properties>
6+
<title>Modello Velocity Plugin</title>
7+
<author email="gnodet_AT_apache_DOT_org">Guillaume Nodet</author>
8+
</properties>
9+
10+
<body>
11+
12+
<section name="Modello Velocity Plugin">
13+
14+
<p>Modello Velocity Plugin generates files from the Modello model using <a href="https://velocity.apache.org/engine/2.3/vtl-reference.html">Velocity templates</a>.</p>
15+
16+
</section>
17+
18+
<section name="Velocity Processing">
19+
20+
<p>The plugin is configured with a list of <code>template</code> files to evaluate.</p>
21+
<p>During template evaluation, <code>#MODELLO-VELOCITY#REDIRECT {relative path to file}</code> pseudo macro is available to send the rendered content to a file.</p>
22+
<p>The Velocity context contains some variables related to the Modello model context that you can use:
23+
<table>
24+
<tr><th>Variable</th><th>Type</th><th>Description</th></tr>
25+
<tr><td>parameters configured in the plugin</td><td><code>String</code></td>
26+
<td>The parameters values configured in the plugin as <code>{key}={value}</code>.</td>
27+
</tr>
28+
<tr><td><code>version</code></td><td><code>String</code></td>
29+
<td>The version of the model being used.</td>
30+
</tr>
31+
<tr><td><code>model</code></td><td><a href="../../modello-core/apidocs/org/codehaus/modello/model/package-summary.html"><code>Model</code></a></td>
32+
<td>The Modello model.</td>
33+
</tr>
34+
<tr><td><code>Helper</code></td><td><a href="apidocs/org/codehaus/modello/plugin/velocity/Helper.html"><code>Helper</code></a></td>
35+
<td>A helper tool with classical functions useful to generate content from a Modello model API.</td>
36+
</tr>
37+
</table>
38+
</p>
39+
</section>
40+
41+
</body>
42+
43+
</document>
5.09 KB
Loading

src/site/xdoc/index.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
<p>Modello is a framework for code generation from a simple model.
1515
Modello generates code from a <a href="modello.html">simple model format</a>: based on a plugin architecture, various types of code and
1616
descriptors can be generated from the single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, XSD, JSON Schema
17-
and documentation.</p>
17+
and documentation.
18+
Starting with 2.1.0, content can even be <a href="modello-plugins/modello-plugin-velocity/">generated from Velocity templates</a> for maximum flexibility.
19+
</p>
1820

1921
<p>
2022
<img src="modello-deps.png" width="755" height="357" border="0" usemap="#Modello_dependencies" />
@@ -33,10 +35,12 @@
3335
<area shape="rect" coords="14,93,106,129" href="modello-plugins/modello-plugin-jackson/" />
3436
<area shape="rect" coords="108,93,240,129" href="modello-plugins/modello-plugin-jsonschema/" />
3537
<area shape="rect" coords="261,93,382,129" href="modello-plugins/modello-plugin-snakeyaml/" />
38+
<area shape="rect" coords="135,195,219,232" href="modello-plugins/modello-plugin-velocity/" />
3639
<area shape="rect" coords="0,83,754,239" href="modello-plugins/" />
3740
<area shape="rect" coords="258,0,415,35" href="modello-maven-plugin/" />
3841
<area shape="rect" coords="449,321,583,356" href="../" />
39-
<area shape="rect" coords="445,37,620,74" href="http://maven.apache.org/ref/current/maven-plugin-api/" />
42+
<area shape="rect" coords="114,263,240,301" href="https://velocity.apache.org/" />
43+
<area shape="rect" coords="445,37,620,74" href="https://maven.apache.org/ref/current/maven-plugin-api/" />
4044
</map>
4145
</p>
4246

src/site/xdoc/modello-deps.odg

-3.36 KB
Binary file not shown.

0 commit comments

Comments
 (0)