Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 0 additions & 85 deletions modello-maven-plugin/src/site/apt/index.apt

This file was deleted.

86 changes: 0 additions & 86 deletions modello-maven-plugin/src/site/apt/usage.apt.vm

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
------
Example of multi-model configuration
------
Denis Cabasson
------
10 August 2006
------
# Processing Multiple Modello Models

Processing Multiple Modello Models
Configuring your pom.xml
------------------------

* Configuring your pom.xml
You can use the following configuration in your `pom.xml` to have the Modello Plugin take two of your models into account (this configuration is taken from the maven-assembly-plugin which indeed uses two different models).

You can use the following configuration in your <<<pom.xml>>> to have the Modello
Plugin take two of your models into account (this configuration is taken
from the maven-assembly-plugin which indeed uses two different models).

+---+
```xml
<project>
[...]
<build>
Expand Down Expand Up @@ -63,4 +54,4 @@ Processing Multiple Modello Models
</build>
[...]
</project>
+---+
```
41 changes: 41 additions & 0 deletions modello-maven-plugin/src/site/markdown/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Modello Maven Plugin

This plugin makes use of the [Modello](https://codehaus-plexus.github.io/modello/) project.

## Goals Overview

- [modello:xsd](./xsd-mojo.html) Generates an XML Schema from the Modello model.
- [modello:xdoc](./xdoc-mojo.html) Generates standard documentation for the Modello model, in xdoc format.
- [modello:java](./java-mojo.html) Generates Java beans from the Modello model.
- [modello:xpp3-writer](./xpp3-writer-mojo.html) Generates an XML Pull Parser writer from the Modello model.
- [modello:xpp3-reader](./xpp3-reader-mojo.html) Generates an XML Pull Parser reader from the Modello model.
- [modello:xpp3-extended-reader](./xpp3-extended-reader-mojo.html) Generates an XML Pull Parser reader from the Modello model that records line/column number metadata and eventual source in the parsed model.
- [modello:xpp3-extended-writer](./xpp3-extended-writer-mojo.html) Generates an XML Pull Parser writer from the Modello model that writes line/column number and source info as comments on each line.
- [modello:dom4j-writer](./dom4j-writer-mojo.html) Generates a DOM4J writer from the Modello model.
- [modello:dom4j-reader](./dom4j-reader-mojo.html) Generates a DOM4J reader from the Modello model.
- [modello:stax-writer](./stax-writer-mojo.html) Generates a StAX writer from the Modello model.
- [modello:stax-reader](./stax-reader-mojo.html) Generates a StAX reader from the Modello model.
- [modello:jdom-writer](./jdom-writer-mojo.html) Generates a [jdom](http://www.jdom.org/) writer from the model that is capable of preserving element ordering and comments.
- [modello:jackson-writer](./jackson-writer-mojo.html) Generates a JSON writer based on Jackson Streaming APIs from the Modello model.
- [modello:jackson-reader](./jackson-reader-mojo.html) Generates a JSON reader based on Jackson Streaming APIs from the Modello model.
- [modello:jackson-extended-reader](./jackson-extended-reader-mojo.html) Generates a JSON reader based on Jackson Streaming APIs from the. Modello model that records line/column number metadata in the parsed model.
- [modello:snakeyaml-writer](./snakeyaml-writer-mojo.html) Generates a YAML writer based on SnakeYaml Streaming APIs from the Modello model.
- [modello:snakeyaml-reader](./snakeyaml-reader-mojo.html) Generates a YAML reader based on SnakeYaml Streaming APIs from the Modello model.
- [modello:snakeyaml-extended-reader](./snakeyaml-extended-reader-mojo.html) Generates a YAML reader based on SnakeYaml Streaming APIs from the. Modello model that records line/column number metadata in the parsed model.
- [modello:velocity](./velocity-mojo.html) Creates files from the model using Velocity templates.
- [modello:converters](./converters-mojo.html) Generates classes that can convert between different versions of the model.

## Usage

General instructions on how to use the Modello Plugin can be found on the [usage page](./usage.html). Some more specific use cases are described in the examples given below.

In case you still have questions regarding the plugin's usage, please have a look at the [FAQ](./faq.html) and feel free to contact the [user mailing list](./mailing-lists.html). The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the [mail archive](./mailing-lists.html).

If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our [issue tracker](./issue-management.html). When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our [source repository](./scm.html).

## Examples

To provide you with better understanding of some usages of the Modello Plugin, you can take a look at the following example:

- [Including multiple models](./examples/multi-model.html)

71 changes: 71 additions & 0 deletions modello-maven-plugin/src/site/markdown/usage.md.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Usage

This document is intended to provide instructions for using the modello-maven-plugin.

Typical configuration of the plugin in pom.xml
----------------------------------------------

You can use the following configuration in your `pom.xml` to invoke the Modello Plugin.

```xml
<project>
[...]
<build>
<plugins>
[...]
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
<models>
<model>src/main/mdo/myModel.mdo</model>
</models>
<version>1.0.0</version>
</configuration>
<executions>
<execution>
<id>myModel</id>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
<goal>xpp3-reader</goal>
</goals>
</execution>
<execution>
<id>myModel-site-xsd</id>
<phase>pre-site</phase>
<goals>
<goal>xsd</goal>
</goals>
<configuration>
<outputDirectory>target/generated-site/resources/xsd</outputDirectory>
</configuration>
</execution>
<execution>
<id>myModel-site-doc</id>
<phase>pre-site</phase>
<goals>
<goal>xdoc</goal>
</goals>
</execution>
</executions>
</plugin>
[...]
</plugins>
</build>
[...]
</project>
```

This configuration will take into account the model described in the file `src/main/mdo/myModel.mdo` in version 1.0.0. It will execute the following goals in the `generate-source` phase:

- [java](./java-mojo.html) which will generate Java beans from the model,
- [xpp3-reader](./xpp3-reader-mojo.html) which will create an XPP reader for the model.

The generated Java sources will be located in the `target/generated-sources/modello` folder (or in the folder set by the `outputDirectory` parameter), which will be added as a source folder to the project build cycle.

During the `pre-site` phase, it will execute the following goals:

- [xdoc](./xdoc-mojo.html) which will generate a documentation of the model in the `target/generated-site/xdoc` folder, which will in turn be processed to output in the standard site, during the `site` phase,
- [xsd](./xsd-mojo.html) which will generate an XML Schema for our model in the `target/generated-site/resources/xsd` folder (set by the `outputDirectory` parameter), which will in turn be copied in the standard site, during the `site` phase.
Loading
Loading