Promote modello plugin
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@526982 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa373c3b32
commit
e5ca1ab8be
237
modello/plugin.jelly
Normal file
237
modello/plugin.jelly
Normal file
@ -0,0 +1,237 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project
|
||||||
|
xmlns:j="jelly:core"
|
||||||
|
xmlns:define="jelly:define"
|
||||||
|
xmlns:maven="jelly:maven"
|
||||||
|
xmlns:x="jelly:xml"
|
||||||
|
xmlns:util="jelly:util"
|
||||||
|
xmlns:assert="assert"
|
||||||
|
xmlns:ant="jelly:ant"
|
||||||
|
xmlns:doc="doc"
|
||||||
|
xmlns:modello="modello">
|
||||||
|
|
||||||
|
<define:taglib uri="modello">
|
||||||
|
<define:jellybean name="generate" method="generate" className="org.apache.maven.plugins.modello.ModelloCliWrapper" />
|
||||||
|
</define:taglib>
|
||||||
|
|
||||||
|
<goal name="modello" prereqs="modello:modello" />
|
||||||
|
|
||||||
|
<goal name="modello:modello" description="Code generation based on the property maven.modello.plugins">
|
||||||
|
<maven:paramCheck value="${maven.modello.plugins}" fail="true">The property "maven.modello.plugins" must be defined.</maven:paramCheck>
|
||||||
|
<j:set var="modelloPlugins" value="${maven.modello.plugins}"/>
|
||||||
|
<j:forEach var="modelloPlugin" items="${modelloPlugins}">
|
||||||
|
<attainGoal name="modello:${modelloPlugin}"/>
|
||||||
|
</j:forEach>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- INTERNAL - Checks that required settings are set -->
|
||||||
|
<goal name="modello:check-settings">
|
||||||
|
<maven:paramCheck value="${maven.modello.model}" fail="true">The property "maven.modello.model" must be defined.</maven:paramCheck>
|
||||||
|
<assert:assertFileExists file="${maven.modello.model}"/>
|
||||||
|
<util:file var="modelFile" name="${maven.modello.model}"/>
|
||||||
|
<x:parse var="modelDoc" xml="${modelFile}"/>
|
||||||
|
<x:set var="modelId" select="string($modelDoc/model/id)"/>
|
||||||
|
<j:set var="maven_modello_model_id" value="${modelId}" scope="parent"/>
|
||||||
|
<maven:paramCheck value="${maven.modello.packageWithVersion}" fail="true">The property "maven.modello.packageWithVersion" must be defined.</maven:paramCheck>
|
||||||
|
<maven:paramCheck value="${maven.modello.version}" fail="true">The property "maven.modello.version" must be defined.</maven:paramCheck>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- Java Model -->
|
||||||
|
|
||||||
|
<goal name="modello:java" prereqs="modello:check-settings" description="Generates Java Pojos of the DataModel.">
|
||||||
|
<maven:paramCheck value="${maven.modello.java.targetDirectory}" fail="true">The property "maven.modello.java.targetDirectory" must be defined.</maven:paramCheck>
|
||||||
|
<ant:mkdir dir="${maven.modello.java.targetDirectory}"/>
|
||||||
|
<ant:path id="modello.sources" location="${maven.modello.java.targetDirectory}" />
|
||||||
|
<maven:addPath id="maven.compile.src.set" refid="modello.sources" />
|
||||||
|
<j:set var="sourcesPresent" value="true" scope="parent"/>
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="java"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- XPP3 Reader/Writer -->
|
||||||
|
|
||||||
|
<goal name="modello:xpp3" prereqs="modello:xpp3-reader, modello:xpp3-writer" description="Generates classes to read/write the model from/into a xml file using Xpp3."/>
|
||||||
|
|
||||||
|
<goal name="modello:xpp3-reader" prereqs="modello:java" description="Generates the class to read the model from a xml file using Xpp3.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="xpp3-reader"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="modello:xpp3-writer" prereqs="modello:java" description="Generates the class to write the model into a xml file using Xpp3.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="xpp3-writer"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- STAX Reader/Writer -->
|
||||||
|
|
||||||
|
<goal name="modello:stax" prereqs="modello:stax-reader, modello:stax-writer" description="Generates classes to read/write the model from/into a xml file using Stax."/>
|
||||||
|
|
||||||
|
<goal name="modello:stax-reader" prereqs="modello:java" description="Generates the class to read the model from a xml file using Stax.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="stax-reader"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="modello:stax-writer" prereqs="modello:java" description="Generates the class to write the model into a xml file using Stax.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="stax-writer"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- DOM4J Reader/Writer -->
|
||||||
|
|
||||||
|
<goal name="modello:dom4j" prereqs="modello:dom4j-reader, modello:dom4j-writer" description="Generates classes to read/write the model from/into a xml file using Dom4j."/>
|
||||||
|
|
||||||
|
<goal name="modello:dom4j-reader" prereqs="modello:java" description="Generates the class to read the model from a xml file using Dom4j.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="dom4j-reader"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="modello:dom4j-writer" prereqs="modello:java" description="Generates the class to write the model into a xml file using Dom4j.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="dom4j-writer"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- JDOM Writer -->
|
||||||
|
|
||||||
|
<goal name="modello:jdom" prereqs="modello:jdom-writer" description="Generates classes to write the model into a xml file using JDom."/>
|
||||||
|
|
||||||
|
<goal name="modello:jdom-writer" prereqs="modello:java" description="Generates classes to write the model into a xml file using JDom.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="jdom-writer"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- JPOX Storage -->
|
||||||
|
|
||||||
|
<goal name="modello:jpox" prereqs="modello:jpox-store, modello:jpox-jdo-mapping, modello:jpox-metadata-class" description="Generates classes to read/store the model in a database using JPox."/>
|
||||||
|
|
||||||
|
<goal name="modello:jpox-store" description="Generates the persistence mechanism using JPOX.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="jpox-store"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="modello:jpox-jdo-mapping" description="Generates the JDO mapping for JPOX.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="jpox-jdo-mapping"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="modello:jpox-metadata-class" description="Generates MetaData class for jpox.">
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="jpox-metadata-class"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.java.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- XSD generation -->
|
||||||
|
|
||||||
|
<goal name="modello:xsd" prereqs="modello:check-settings" description="Generates an XML Schema for the xml file used to store the model.">
|
||||||
|
<maven:paramCheck value="${maven.modello.xsd.targetDirectory}" fail="true">The property "maven.modello.xsd.targetDirectory" must be defined.</maven:paramCheck>
|
||||||
|
<ant:mkdir dir="${maven.modello.xsd.targetDirectory}"/>
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="xsd"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.xsd.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- XDOC generation -->
|
||||||
|
|
||||||
|
<goal name="modello:xdoc" prereqs="modello:check-settings" description="Generates a xdoc file to document the model.">
|
||||||
|
<maven:paramCheck value="${maven.modello.xdoc.targetDirectory}" fail="true">The property "maven.modello.xdoc.targetDirectory" must be defined.</maven:paramCheck>
|
||||||
|
<ant:mkdir dir="${maven.modello.xdoc.targetDirectory}"/>
|
||||||
|
<modello:generate
|
||||||
|
model="${maven.modello.model}"
|
||||||
|
type="xdoc"
|
||||||
|
packageWithVersion="${maven.modello.packageWithVersion}"
|
||||||
|
version="${maven.modello.version}"
|
||||||
|
targetDirectory="${maven.modello.xdoc.targetDirectory}" />
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<!-- Site report (XDOC + XSD) -->
|
||||||
|
|
||||||
|
<goal name="maven-modello-plugin:register" description="Register the model documentation." prereqs="modello:check-settings">
|
||||||
|
<doc:registerReport
|
||||||
|
name="Model documentation"
|
||||||
|
pluginName="maven-modello-plugin-xdoc"
|
||||||
|
link="${maven_modello_model_id}"
|
||||||
|
description="Documentation of the model."/>
|
||||||
|
<doc:registerReport
|
||||||
|
name="Model schema"
|
||||||
|
pluginName="maven-modello-plugin-xsd"
|
||||||
|
link="${maven_modello_model_id}-${maven.modello.version}"
|
||||||
|
target="_blank"
|
||||||
|
fileSuffix=".xsd"
|
||||||
|
description="Schema for the xml model."/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="maven-modello-plugin:deregister" description="Deregister the model documentation.">
|
||||||
|
<doc:deregisterReport name="Model documentation"/>
|
||||||
|
<doc:deregisterReport name="Model schema"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="maven-modello-plugin-xdoc:report" description="Called by site to generate the model documentation." prereqs="modello:xdoc"/>
|
||||||
|
|
||||||
|
<goal name="maven-modello-plugin-xsd:report" description="Called by site to generate the model schema." prereqs="modello:xsd"/>
|
||||||
|
|
||||||
|
</project>
|
||||||
25
modello/plugin.properties
Normal file
25
modello/plugin.properties
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# -------------------------------------------------------------------
|
||||||
|
# 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.
|
||||||
|
# -------------------------------------------------------------------
|
||||||
|
maven.modello.model=${basedir}/src/main/resources/model.mdo
|
||||||
|
maven.modello.packageWithVersion=
|
||||||
|
maven.modello.version=
|
||||||
|
|
||||||
|
maven.modello.java.targetDirectory=${maven.build.dir}/generated-src/main/modello
|
||||||
|
maven.modello.xsd.targetDirectory=${maven.gen.docs}
|
||||||
|
maven.modello.xdoc.targetDirectory=${maven.gen.docs}
|
||||||
|
|
||||||
|
maven.modello.plugins=java,xdoc
|
||||||
23
modello/project.properties
Normal file
23
modello/project.properties
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# -------------------------------------------------------------------
|
||||||
|
# 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.
|
||||||
|
# -------------------------------------------------------------------
|
||||||
|
|
||||||
|
#=====
|
||||||
|
# Repositories settings
|
||||||
|
#=====
|
||||||
|
|
||||||
|
# TODO: remove http://snapshots.dist.codehaus.org/modello/ and http://people.apache.org/repo/m1-snapshot-repository/
|
||||||
|
maven.repo.remote = http://snapshots.dist.codehaus.org/modello/,http://people.apache.org/repo/m1-snapshot-repository/,http://repo1.maven.org/maven
|
||||||
194
modello/project.xml
Normal file
194
modello/project.xml
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/3.0.0 http://maven.apache.org/maven-v3_0_0.xsd">
|
||||||
|
<extend>../plugins-parent/project.xml</extend>
|
||||||
|
<artifactId>maven-modello-plugin</artifactId>
|
||||||
|
<name>Maven Modello Plugin</name>
|
||||||
|
<description>Modello is a Data Model toolkit. This plugin permits to integrate modello services in your build to automatically (or manually) generate the code and the documentation from the DataModel.</description>
|
||||||
|
<shortDescription>Wrapper for Modello, a Data Model toolkit.</shortDescription>
|
||||||
|
<currentVersion>1.0-SNAPSHOT</currentVersion>
|
||||||
|
<inceptionYear>2004</inceptionYear>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>Brett Porter</name>
|
||||||
|
<id>brett</id>
|
||||||
|
<email>brett@apache.org</email>
|
||||||
|
<roles>
|
||||||
|
<role>Developer</role>
|
||||||
|
</roles>
|
||||||
|
<timezone>+10</timezone>
|
||||||
|
</developer>
|
||||||
|
<developer>
|
||||||
|
<name>Arnaud Heritier</name>
|
||||||
|
<id>aheritier</id>
|
||||||
|
<email>aheritier@apache.org</email>
|
||||||
|
<organization>Octo Technology</organization>
|
||||||
|
<roles>
|
||||||
|
<role>PMC Member</role>
|
||||||
|
<role>Java Developer</role>
|
||||||
|
</roles>
|
||||||
|
<timezone>+1</timezone>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
<dependencies>
|
||||||
|
<!-- Modello Core -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-core</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello XPP3 plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-xpp3</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello STAX plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-stax</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello DOM4J plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-dom4j</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello XDOC plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-xdoc</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello JPOX plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-jpox</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-db-keywords</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello XSD plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-xsd</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello JDOM plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-jdom</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Modello plugin utilities-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-store</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required by modello-plugin-stax</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.modello</groupId>
|
||||||
|
<artifactId>modello-plugin-xml</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
<properties>
|
||||||
|
<comment>
|
||||||
|
Required by modello-plugin-xpp3, modello-plugin-stax, modello-plugin-dom4j, modello-plugin-xdoc,
|
||||||
|
modello-plugin-xsd, modello-plugin-jdom
|
||||||
|
</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Other dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-container-default</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required by modello-core</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-component-api</artifactId>
|
||||||
|
<version>1.0-alpha-15</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required by plexus</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>1.0.5</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required by modello-plugin-xpp3, modello-plugin-jdom</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-velocity</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required by modello-plugin-store</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-classworlds</artifactId>
|
||||||
|
<version>1.2-alpha-5</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required by plexus</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- BE CAREFUL -->
|
||||||
|
<!-- You'll not find here the dependencies needed to use classes generated by modello -->
|
||||||
|
<!-- BE CAREFUL -->
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
<versions>
|
||||||
|
<version>
|
||||||
|
<id>1.0-alpha-1</id>
|
||||||
|
<name>1.0-alpha-1</name>
|
||||||
|
<tag>maven-modello-plugin-1.0-alpha-1</tag>
|
||||||
|
</version>
|
||||||
|
<version>
|
||||||
|
<id>1.0-alpha-2</id>
|
||||||
|
<name>1.0-alpha-2</name>
|
||||||
|
<tag>maven-modello-plugin-1.0-alpha-2</tag>
|
||||||
|
</version>
|
||||||
|
</versions>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
package org.apache.maven.plugins.modello;
|
||||||
|
|
||||||
|
/* ====================================================================
|
||||||
|
* 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.
|
||||||
|
* ====================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.codehaus.modello.ModelloCli;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||||
|
* @version $Id: ArtifactDeployer.java,v 1.6 2004/09/06 04:26:10 felipeal Exp $
|
||||||
|
*/
|
||||||
|
public class ModelloCliWrapper
|
||||||
|
{
|
||||||
|
private String model;
|
||||||
|
|
||||||
|
private String packageWithVersion;
|
||||||
|
|
||||||
|
private String version;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private String targetDirectory;
|
||||||
|
|
||||||
|
public void generate() throws Exception
|
||||||
|
{
|
||||||
|
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
|
||||||
|
Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
|
||||||
|
String[] args = new String[] { this.model, this.type, this.targetDirectory, this.version, this.packageWithVersion };
|
||||||
|
ModelloCli.main( args );
|
||||||
|
Thread.currentThread().setContextClassLoader( oldClassLoader );
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModel()
|
||||||
|
{
|
||||||
|
return this.model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPackageWithVersion()
|
||||||
|
{
|
||||||
|
return this.packageWithVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion()
|
||||||
|
{
|
||||||
|
return this.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return this.type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTargetDirectory()
|
||||||
|
{
|
||||||
|
return this.targetDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModel( String model )
|
||||||
|
{
|
||||||
|
this.model = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackageWithVersion( String packageWithVersion )
|
||||||
|
{
|
||||||
|
this.packageWithVersion = packageWithVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion( String version )
|
||||||
|
{
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType( String type )
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTargetDirectory( String targetDirectory )
|
||||||
|
{
|
||||||
|
this.targetDirectory = targetDirectory;
|
||||||
|
}
|
||||||
|
}
|
||||||
57
modello/src/plugin-test/maven.xml
Normal file
57
modello/src/plugin-test/maven.xml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:assert="assert">
|
||||||
|
|
||||||
|
<!-- Register Modello -->
|
||||||
|
<preGoal name="java:compile">
|
||||||
|
<attainGoal name="modello"/>
|
||||||
|
</preGoal>
|
||||||
|
|
||||||
|
<goal name="testPlugin" prereqs="clean,testJava,testSite"/>
|
||||||
|
|
||||||
|
<goal name="testJava" prereqs="jar">
|
||||||
|
<!-- Java Plugin -->
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/Model.class"/>
|
||||||
|
<!-- XPP3 Plugin -->
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/io/xpp3/MavenXpp3Reader.class"/>
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/io/xpp3/MavenXpp3Writer.class"/>
|
||||||
|
<!-- Stax Plugin -->
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/io/stax/MavenStaxReader.class"/>
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/io/stax/MavenStaxWriter.class"/>
|
||||||
|
<!-- Dom4J Plugin -->
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/io/dom4j/MavenDom4jReader.class"/>
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/io/dom4j/MavenDom4jWriter.class"/>
|
||||||
|
<!-- JPox Plugin -->
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/MavenJPoxStore.class"/>
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/MavenModelloMetadata.class"/>
|
||||||
|
<!-- JDom Plugin -->
|
||||||
|
<assert:assertFileExists file="${maven.build.dest}/org/apache/maven/model/io/jdom/MavenJDOMWriter.class"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
<goal name="testSite" prereqs="site">
|
||||||
|
<assert:assertFileExists file="${maven.gen.docs}/${maven_modello_model_id}.xml"/>
|
||||||
|
<assert:assertFileExists file="${maven.gen.docs}/${maven_modello_model_id}-${maven.modello.version}.xsd"/>
|
||||||
|
<assert:assertFileContains file="${maven.gen.docs}/${maven_modello_model_id}-${maven.modello.version}.xsd" match="xmlns="http://maven.apache.org/POM/3.0.0"" msg="xmlns invalid in schema"/>
|
||||||
|
<assert:assertFileContains file="${maven.gen.docs}/${maven_modello_model_id}-${maven.modello.version}.xsd" match="targetNamespace="http://maven.apache.org/POM/3.0.0"" msg="targetNamespace invalid in schema"/>
|
||||||
|
<assert:assertFileExists file="${maven.docs.dest}/${maven_modello_model_id}.html"/>
|
||||||
|
<assert:assertFileExists file="${maven.docs.dest}/${maven_modello_model_id}-${maven.modello.version}.xsd"/>
|
||||||
|
</goal>
|
||||||
|
|
||||||
|
</project>
|
||||||
20
modello/src/plugin-test/project.properties
Normal file
20
modello/src/plugin-test/project.properties
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# -------------------------------------------------------------------
|
||||||
|
# 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.
|
||||||
|
# -------------------------------------------------------------------
|
||||||
|
maven.modello.model=${basedir}/src/main/mdo/model.mdo
|
||||||
|
maven.modello.packageWithVersion=false
|
||||||
|
maven.modello.version=3.0.0
|
||||||
|
maven.modello.plugins=xpp3,stax,dom4j,jpox,jdom
|
||||||
86
modello/src/plugin-test/project.xml
Normal file
86
modello/src/plugin-test/project.xml
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/3.0.0 http://maven.apache.org/maven-v3_0_0.xsd">
|
||||||
|
<pomVersion>3</pomVersion>
|
||||||
|
<groupId>maven</groupId>
|
||||||
|
<artifactId>maven-modello-plugin-tests</artifactId>
|
||||||
|
<currentVersion>1.0</currentVersion>
|
||||||
|
<name>Test project for Modello</name>
|
||||||
|
<description>This project is used to test capabilities of the modello plugin</description>
|
||||||
|
<package>org.apache.maven.model</package>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.jdo</groupId>
|
||||||
|
<artifactId>jdo2-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required for modello JDO/JPOX storage</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>maven</groupId>
|
||||||
|
<artifactId>dom4j</artifactId>
|
||||||
|
<version>1.7-20060614</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required for modello DOM4J Reader/Writer</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>1.0.5</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required for modello DOM4J Reader/Writer</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>stax</groupId>
|
||||||
|
<artifactId>stax-api</artifactId>
|
||||||
|
<version>1.0.1</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required for modello STAX Reader/Writer</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.dev.stax-utils</groupId>
|
||||||
|
<artifactId>stax-utils</artifactId>
|
||||||
|
<version>20060502</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required for modello STAX Reader/Writer</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>jdom</groupId>
|
||||||
|
<artifactId>jdom</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<properties>
|
||||||
|
<comment>Required for modello JDOM Writer</comment>
|
||||||
|
</properties>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>${maven.build.dir}/generated-src/main/modello</sourceDirectory>
|
||||||
|
</build>
|
||||||
|
<reports>
|
||||||
|
<report>maven-javadoc-plugin</report>
|
||||||
|
<report>maven-modello-plugin</report>
|
||||||
|
</reports>
|
||||||
|
</project>
|
||||||
3016
modello/src/plugin-test/src/main/mdo/model.mdo
Normal file
3016
modello/src/plugin-test/src/main/mdo/model.mdo
Normal file
File diff suppressed because it is too large
Load Diff
59
modello/xdocs/changes.xml
Normal file
59
modello/xdocs/changes.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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>Changes</title>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
|
</properties>
|
||||||
|
<body>
|
||||||
|
<release version="1.0-SNAPSHOT" date="In SVN">
|
||||||
|
<action dev="aheritier" type="add">New site report (maven-modello-plugin) to generate the model documentation and the XML schema.</action>
|
||||||
|
<action dev="aheritier" type="add">New goal modello:xsd</action>
|
||||||
|
<action dev="aheritier" type="add">New goals modello:jpox and modello:jpox-metadata-class</action>
|
||||||
|
<action dev="aheritier" type="add">New goals modello:jdom, and modello:jdom-writer</action>
|
||||||
|
<action dev="aheritier" type="add">New goals modello:dom4j, modello:dom4j-reader and modello:dom4j-writer</action>
|
||||||
|
<action dev="aheritier" type="add">New goals modello:stax, modello:stax-reader and modello:stax-writer</action>
|
||||||
|
<action dev="aheritier" type="add">Automatically verify required properties.</action>
|
||||||
|
<action dev="aheritier" type="add">Add a test to validate generations from modello plugins.</action>
|
||||||
|
<action dev="aheritier" type="add">New property maven.modello.plugins to select plugins to call for the goal modello:modello</action>
|
||||||
|
<action dev="aheritier" type="update">The property maven.modello.targetDirectory is replaced by maven.modello.java.targetDirectory,maven.modello.xsd.targetDirectory, and maven.modello.xdoc.targetDirectory</action>
|
||||||
|
<action dev="aheritier" type="update">The plugin is now based on modello libraries 1.0-alpha-14.</action>
|
||||||
|
<action dev="aheritier" type="add">Add plugin documentation and refactor web site.</action>
|
||||||
|
</release>
|
||||||
|
<release version="1.0-alpha-2" date="2005-09-07">
|
||||||
|
<action dev="brett" type="fix">Fix web site address</action>
|
||||||
|
</release>
|
||||||
|
<release version="1.0-alpha-1" date="2005-06-02">
|
||||||
|
<action dev="trygvis" type="add">New goals modello:jpox-store and modello:jpox-jdo-mapping</action>
|
||||||
|
<action dev="trygvis" type="add">New goal modello:xdoc</action>
|
||||||
|
<action dev="trygvis" type="add">New goals modello:xpp3-reader and modello:xpp3-writer</action>
|
||||||
|
<action dev="trygvis" type="add">New property maven.modello.targetDirectory</action>
|
||||||
|
<action dev="trygvis" type="add">New property maven.modello.version</action>
|
||||||
|
<action dev="trygvis" type="add">New property maven.modello.packageWithVersion</action>
|
||||||
|
<action dev="trygvis" type="add">New property maven.modello.model</action>
|
||||||
|
<action dev="brett" type="add">New goal modello:xpp3</action>
|
||||||
|
<action dev="brett" type="add">New goal modello:java</action>
|
||||||
|
<action dev="brett" type="add">New goals modello and modello:modello</action>
|
||||||
|
<action dev="brett" type="add">New jelly tag modello:generate</action>
|
||||||
|
<action dev="brett" type="add">Initiate the plugin based on modello libraries 1.0-alpha-2</action>
|
||||||
|
</release>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
128
modello/xdocs/goals.xml
Normal file
128
modello/xdocs/goals.xml
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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>Goals</title>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
|
</properties>
|
||||||
|
<body>
|
||||||
|
<section name="Goals">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Goal</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello"></a>modello</td>
|
||||||
|
<td>Default goal for the plugin. It calls <code>modello:modello</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:modello"></a>modello:modello</td>
|
||||||
|
<td>Code generation based on the property <code>maven.modello.plugins</code>. Each plugin listed in this property is called as a goal <code>modello:<i>pluginName</i></code>. If <code>maven.modello.plugins=java,stax,jpox</code> a call to <code>modello(:modello)</code> will call goals <code>modello:java, modello:stax, modello:jpox</code>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:java"></a>modello:java</td>
|
||||||
|
<td>Generates Java Pojos of the DataModel in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Java - XML Mappings</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:dom4j"></a>modello:dom4j</td>
|
||||||
|
<td>Generates classes in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to read/write the model from/into a xml file using <a href="http://www.dom4j.org/" target="_blank">Dom4j</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:dom4j-reader"></a>modello:dom4j-reader</td>
|
||||||
|
<td>Generates the class in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to read the model from a xml file using <a href="http://www.dom4j.org/" target="_blank">Dom4j</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:dom4j-writer"></a>modello:dom4j-writer</td>
|
||||||
|
<td>Generates the class in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to write the model into a xml file using <a href="http://www.dom4j.org/" target="_blank">Dom4j</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:jdom"></a>modello:jdom</td>
|
||||||
|
<td>Generates classes in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to write the model into a xml file using <a href="http://www.jdom.org/" target="_blank">JDom</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:jdom-writer"></a>modello:jdom-writer</td>
|
||||||
|
<td>Generates classes in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to write the model into a xml file using <a href="http://www.jdom.org/" target="_blank">JDom</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:stax"></a>modello:stax</td>
|
||||||
|
<td>Generates classes in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to read/write the model from/into a xml file using <a href="http://stax.codehaus.org/" target="_blank">STAX RI</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:stax-reader"></a>modello:stax-reader</td>
|
||||||
|
<td>Generates the class in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to read the model from a xml file using <a href="http://stax.codehaus.org/" target="_blank">STAX RI</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:stax-writer"></a>modello:stax-writer</td>
|
||||||
|
<td>Generates the class in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to write the model into a xml file using <a href="http://stax.codehaus.org/" target="_blank">STAX RI</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:xpp3"></a>modello:xpp3</td>
|
||||||
|
<td>Generates classes in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to read/write the model from/to a xml file using <a href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/" target="_blank">Xpp3</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:xpp3-reader"></a>modello:xpp3-reader</td>
|
||||||
|
<td>Generates the class in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to read the model from a xml file using <a href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/" target="_blank">Xpp3</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:xpp3-writer"></a>modello:xpp3-writer</td>
|
||||||
|
<td>Generates the class in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to write the model into a xml file using <a href="http://www.extreme.indiana.edu/xgws/xsoap/xpp/" target="_blank">Xpp3</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Java - Database Storage</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:jpox"></a>modello:jpox</td>
|
||||||
|
<td>Generates classes in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> to read/store the model in a database using <a href="http://www.jpox.org/" target="_blank">JPox</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:jpox-jdo-mapping"></a>modello:jpox-jdo-mapping</td>
|
||||||
|
<td>Generates in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> the JOD mapping for <a href="http://www.jpox.org/" target="_blank">JPox</a> (<code>package.jdo</code>).</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:jpox-metadata-class"></a>modello:jpox-metadata-class</td>
|
||||||
|
<td>Generates in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> MetaData class for <a href="http://www.jpox.org/" target="_blank">JPox</a>.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:jpox-store"></a>modello:jpox-store</td>
|
||||||
|
<td>Generates in the directory <a href="properties.html"><code>${maven.modello.java.targetDirectory}</code></a> the <a href="http://www.jpox.org/" target="_blank">JPox</a> code to do the persistence of the model in a DB.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Documentation and validation</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:xsd"></a>modello:xsd</td>
|
||||||
|
<td>Generates an XML Schema in the directory <a href="properties.html"><code>${maven.modello.xsd.targetDirectory}</code></a> for the xml file used to store the model.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a name="modello:xdoc"></a>modello:xdoc</td>
|
||||||
|
<td>Generates a xdoc file in the directory <a href="properties.html"><code>${maven.modello.xdoc.targetDirectory}</code></a> to document the model.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
74
modello/xdocs/index.xml
Normal file
74
modello/xdocs/index.xml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?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>Overview</title>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
|
</properties>
|
||||||
|
<body>
|
||||||
|
<section name="Overview">
|
||||||
|
<subsection name="Modello">
|
||||||
|
<p><a href="http://modello.codehaus.org/" target="_blank">Modello</a> is a Data Model toolkit.</p>
|
||||||
|
<p>From a <a href="http://modello.codehaus.org/DataModel" target="_blank">DataModel</a> defined in XML, Modello can generate any of the following at compile time:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Java Pojos of the <a href="http://modello.codehaus.org/DataModel" target="_blank">DataModel</a>.</li>
|
||||||
|
<li>Java Pojos to XML Writer. (provided via xpp3, stax, jdom or dom4j)</li>
|
||||||
|
<li>XML to Java Pojos Reader. (provided via xpp3, stax or dom4j)</li>
|
||||||
|
<li>Java Model to JPOX Store.</li>
|
||||||
|
<li>Java Model to JPOX Mapping.</li>
|
||||||
|
<li>Xdoc documentation of the <a href="http://modello.codehaus.org/DataModel" target="_blank">DataModel</a>.</li>
|
||||||
|
<li>XML Schema to validate data.</li>
|
||||||
|
<li>and more in the future...</li>
|
||||||
|
</ul>
|
||||||
|
</subsection>
|
||||||
|
<subsection name="Maven 1 plugin for Modello">
|
||||||
|
<p>This plugin allows you to integrate modello services in your build to automatically (or manually) generate the code and the documentation from the DataModel.</p>
|
||||||
|
</subsection>
|
||||||
|
<subsection name="Others documents">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Document</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="install.html">Installation</a></td>
|
||||||
|
<td>How to install this plugin?</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="usage.html">Usage</a></td>
|
||||||
|
<td>How to use this plugin?</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="goals.html">Goals</a></td>
|
||||||
|
<td>Goals documentation.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="properties.html">Properties</a></td>
|
||||||
|
<td>Properties documentation.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="changes-report.html">Changes</a></td>
|
||||||
|
<td>Changes in each release of this plugin.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</subsection>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
55
modello/xdocs/install.xml
Normal file
55
modello/xdocs/install.xml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?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>Installation</title>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
|
</properties>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<section name="How to install the plugin ?">
|
||||||
|
<p>This plugin isn't bundled in the maven 1 distribution thus you have deploy it in your local installation of maven 1, or you have to define it in your project dependencies (RECOMMENDED).</p>
|
||||||
|
<p>We suppose that <b><i>CURRENT_VERSION</i></b> is the version of the plugin you want to use. The <a href="changes-report.html">changes</a> report gives you the list of versions actually available.</p>
|
||||||
|
<p>If you want to use a SNAPSHOT of this plugin, you'll certainly have to add the following remote repositories in your settings (property <code>maven.repo.remote</code>) :</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>http://snapshots.dist.codehaus.org/modello/</code> : To acquire snapshots of modello.</li>
|
||||||
|
<li><code>http://people.apache.org/repo/m1-snapshot-repository/</code> : To acquire snapshots of the modello plugin for m1.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<subsection name="In your maven installation">
|
||||||
|
<p>To install it locally, you just have to launch this command :</p>
|
||||||
|
<source>maven plugin:download -DgroupId=maven -DartifactId=maven-modello-plugin -Dversion=CURRENT_VERSION</source>
|
||||||
|
<p>You have to do it on all installations of maven 1 which will be used to build your project.</p>
|
||||||
|
</subsection>
|
||||||
|
<subsection name="In a given project">
|
||||||
|
<p>You can easily ask to maven to download/install/use this plugin in your project. You just have to add in your project POM a dependency to this plugin :</p>
|
||||||
|
<source><![CDATA[
|
||||||
|
<dependency>
|
||||||
|
<groupId>maven</groupId>
|
||||||
|
<artifactId>maven-modello-plugin</artifactId>
|
||||||
|
<version>CURRENT_VERSION</version>
|
||||||
|
<type>plugin</type>
|
||||||
|
</dependency>]]></source>
|
||||||
|
</subsection>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
42
modello/xdocs/navigation.xml
Normal file
42
modello/xdocs/navigation.xml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
<project name="Maven Modello Plugin">
|
||||||
|
<title>Maven Modello Plugin</title>
|
||||||
|
<body>
|
||||||
|
<breadcrumbs>
|
||||||
|
<item name="Apache" href="http://www.apache.org"/>
|
||||||
|
<item name="Maven" href="http://maven.apache.org/"/>
|
||||||
|
<item name="Maven 1.x" href="http://maven.apache.org/maven-1.x/"/>
|
||||||
|
<item name="Plugins" href="http://maven.apache.org/maven-1.x/plugins/"/>
|
||||||
|
<item name="Sandbox" href="http://maven.apache.org/maven-1.x/plugins/sandbox/"/>
|
||||||
|
</breadcrumbs>
|
||||||
|
<links>
|
||||||
|
<item name="Modello" href="http://modello.codehaus.org/" target="_blank"/>
|
||||||
|
</links>
|
||||||
|
<menu name="Maven Modello Plugin">
|
||||||
|
<item name="Overview" href="/index.html"/>
|
||||||
|
<item name="Installation" href="/install.html"/>
|
||||||
|
<item name="Usage" href="/usage.html"/>
|
||||||
|
<item name="Goals" href="/goals.html"/>
|
||||||
|
<item name="Properties" href="/properties.html"/>
|
||||||
|
<item name="Changes" href="/changes-report.html"/>
|
||||||
|
</menu>
|
||||||
|
</body>
|
||||||
|
</project>
|
||||||
100
modello/xdocs/properties.xml
Normal file
100
modello/xdocs/properties.xml
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* 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>Properties</title>
|
||||||
|
<author email="aheritier@apache.org">Arnaud Heritier</author>
|
||||||
|
</properties>
|
||||||
|
<body>
|
||||||
|
<section name="Maven Modello Plugin Settings">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Property</th>
|
||||||
|
<th>Optional?</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.version</td>
|
||||||
|
<td>No</td>
|
||||||
|
<td>
|
||||||
|
<p>This property must be set to to tell to modello which version of the model must be used.</p>
|
||||||
|
<p>Default value is <code>empty</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.packageWithVersion</td>
|
||||||
|
<td>No</td>
|
||||||
|
<td>
|
||||||
|
<p>This property must be set to true or false to tell to modello to generate a package name with the version of the model.</p>
|
||||||
|
<p>Default value is <code>empty</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.package</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>Replaces the default package defined in the model.</p>
|
||||||
|
<p>Default value is <code>empty</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.plugins</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>This is the list of modello plugins to use when the goal <code>modello(:modello)</code> is used. Each plugin has it's own goal in this plugin : <code>modello:java, modello:stax, modello:xpp3</code> (See the <a href="goals.html">list of goals</a> to find all the possible values).</p>
|
||||||
|
<p>Default value is <code>java,xdoc</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.xsd.targetDirectory</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>Directory in which is generated the xml schema to validate instances of the model (goal <code>modello:xsd</code>).</p>
|
||||||
|
<p>Default value is <code>${maven.gen.docs}</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.java.targetDirectory</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>Directory in which are generated java sources from modello plugins : java, xpp3, ... .</p>
|
||||||
|
<p>Default value is <code>${maven.build.dir}/generated-src/main/modello</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.xdoc.targetDirectory</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>Directory in which is generated the xdoc to document the model (goal <code>modello:xdoc</code>).</p>
|
||||||
|
<p>Default value is <code>${maven.gen.docs}</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>maven.modello.model</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>
|
||||||
|
<p>The path to the modello model to use.</p>
|
||||||
|
<p>Default value is <code>${basedir}/src/main/resources/model.mdo</code>.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</document>
|
||||||
58
modello/xdocs/usage.xml
Normal file
58
modello/xdocs/usage.xml
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?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>
|
||||||
Loading…
x
Reference in New Issue
Block a user