git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@526982 13f79535-47bb-0310-9956-ffa450edef68
59 lines
2.7 KiB
XML
59 lines
2.7 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
* (the "License"); you may not use this file except in compliance with
|
|
* the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
-->
|
|
<document>
|
|
<properties>
|
|
<title>Usage</title>
|
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
|
</properties>
|
|
<body>
|
|
|
|
<section name="How to use the plugin ?">
|
|
<subsection name="Prerequisites">
|
|
<ol>
|
|
<li>You have to <a href="http://modello.codehaus.org/DataModel" target="_blank">define your own model</a> in your project in a file named <code>${basedir}/src/main/resources/model.mdo</code> (property <a href="properties.html"><code>maven.modello.model</code></a>). <b>NOTE :</b> Actually the plugin allow to have only one model per project.</li>
|
|
<li>You have also to set the <a href="properties.html">properties</a> <code>maven.modello.packageWithVersion</code> and <code>maven.modello.version</code>.</li>
|
|
</ol>
|
|
</subsection>
|
|
<subsection name="Manual usage">
|
|
<p>After having change your <a href="properties.html">properties</a> to customize the behaviour of modello, you can call any <a href="goals.html">goal</a> in this plugin. To have the full list of goals you must call <code>maven -P modello</code>.</p>
|
|
</subsection>
|
|
<subsection name="Automated usage">
|
|
<p>You can automatically call modello in your build.</p>
|
|
<p>As a pregoal of <code>java:compile</code> to generate your code. The modello goal uses the property <a href="properties.html"><code>maven.modello.plugins</code></a> to know which modello plugins it have to use.</p>
|
|
<source><![CDATA[
|
|
<!-- Register Modello -->
|
|
<preGoal name="java:compile">
|
|
<attainGoal name="modello"/>
|
|
</preGoal>
|
|
]]></source>
|
|
<p>As a report for the web site. It will automatically generate the documentation and the xml schema for your model</p>
|
|
<source><![CDATA[
|
|
<reports>
|
|
...
|
|
<report>maven-modello-plugin</report>
|
|
...
|
|
</reports>
|
|
]]></source>
|
|
</subsection>
|
|
</section>
|
|
|
|
</body>
|
|
</document>
|