From e5ca1ab8be371a1bcf6a5185ff43b873c5c73da9 Mon Sep 17 00:00:00 2001 From: aheritier Date: Tue, 10 Apr 2007 01:12:11 +0000 Subject: [PATCH] Promote modello plugin git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@526982 13f79535-47bb-0310-9956-ffa450edef68 --- modello/plugin.jelly | 237 ++ modello/plugin.properties | 25 + modello/project.properties | 23 + modello/project.xml | 194 ++ .../plugins/modello/ModelloCliWrapper.java | 97 + modello/src/plugin-test/maven.xml | 57 + modello/src/plugin-test/project.properties | 20 + modello/src/plugin-test/project.xml | 86 + .../src/plugin-test/src/main/mdo/model.mdo | 3016 +++++++++++++++++ modello/xdocs/changes.xml | 59 + modello/xdocs/goals.xml | 128 + modello/xdocs/index.xml | 74 + modello/xdocs/install.xml | 55 + modello/xdocs/navigation.xml | 42 + modello/xdocs/properties.xml | 100 + modello/xdocs/usage.xml | 58 + 16 files changed, 4271 insertions(+) create mode 100644 modello/plugin.jelly create mode 100644 modello/plugin.properties create mode 100644 modello/project.properties create mode 100644 modello/project.xml create mode 100644 modello/src/main/org/apache/maven/plugins/modello/ModelloCliWrapper.java create mode 100644 modello/src/plugin-test/maven.xml create mode 100644 modello/src/plugin-test/project.properties create mode 100644 modello/src/plugin-test/project.xml create mode 100644 modello/src/plugin-test/src/main/mdo/model.mdo create mode 100644 modello/xdocs/changes.xml create mode 100644 modello/xdocs/goals.xml create mode 100644 modello/xdocs/index.xml create mode 100644 modello/xdocs/install.xml create mode 100644 modello/xdocs/navigation.xml create mode 100644 modello/xdocs/properties.xml create mode 100644 modello/xdocs/usage.xml diff --git a/modello/plugin.jelly b/modello/plugin.jelly new file mode 100644 index 00000000..831bf517 --- /dev/null +++ b/modello/plugin.jelly @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + The property "maven.modello.plugins" must be defined. + + + + + + + + + The property "maven.modello.model" must be defined. + + + + + + The property "maven.modello.packageWithVersion" must be defined. + The property "maven.modello.version" must be defined. + + + + + + The property "maven.modello.java.targetDirectory" must be defined. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The property "maven.modello.xsd.targetDirectory" must be defined. + + + + + + + + The property "maven.modello.xdoc.targetDirectory" must be defined. + + + + + + + + + + + + + + + + + + + + + diff --git a/modello/plugin.properties b/modello/plugin.properties new file mode 100644 index 00000000..f96addfb --- /dev/null +++ b/modello/plugin.properties @@ -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 \ No newline at end of file diff --git a/modello/project.properties b/modello/project.properties new file mode 100644 index 00000000..fa592e0c --- /dev/null +++ b/modello/project.properties @@ -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 \ No newline at end of file diff --git a/modello/project.xml b/modello/project.xml new file mode 100644 index 00000000..4e3734d6 --- /dev/null +++ b/modello/project.xml @@ -0,0 +1,194 @@ + + + + + ../plugins-parent/project.xml + maven-modello-plugin + Maven Modello Plugin + 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. + Wrapper for Modello, a Data Model toolkit. + 1.0-SNAPSHOT + 2004 + + + Brett Porter + brett + brett@apache.org + + Developer + + +10 + + + Arnaud Heritier + aheritier + aheritier@apache.org + Octo Technology + + PMC Member + Java Developer + + +1 + + + + + + org.codehaus.modello + modello-core + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-xpp3 + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-stax + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-dom4j + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-xdoc + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-jpox + 1.0-alpha-15 + + + org.codehaus.modello + modello-db-keywords + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-xsd + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-jdom + 1.0-alpha-15 + + + + + org.codehaus.modello + modello-plugin-store + 1.0-alpha-15 + + Required by modello-plugin-stax + + + + org.codehaus.modello + modello-plugin-xml + 1.0-alpha-15 + + + Required by modello-plugin-xpp3, modello-plugin-stax, modello-plugin-dom4j, modello-plugin-xdoc, + modello-plugin-xsd, modello-plugin-jdom + + + + + + + org.codehaus.plexus + plexus-container-default + 1.0-alpha-15 + + Required by modello-core + + + + org.codehaus.plexus + plexus-component-api + 1.0-alpha-15 + + Required by plexus + + + + org.codehaus.plexus + plexus-utils + 1.0.5 + + Required by modello-plugin-xpp3, modello-plugin-jdom + + + + org.codehaus.plexus + plexus-velocity + 1.1.2 + + Required by modello-plugin-store + + + + org.codehaus.plexus + plexus-classworlds + 1.2-alpha-5 + + Required by plexus + + + + + + + + + + + 1.0-alpha-1 + 1.0-alpha-1 + maven-modello-plugin-1.0-alpha-1 + + + 1.0-alpha-2 + 1.0-alpha-2 + maven-modello-plugin-1.0-alpha-2 + + + diff --git a/modello/src/main/org/apache/maven/plugins/modello/ModelloCliWrapper.java b/modello/src/main/org/apache/maven/plugins/modello/ModelloCliWrapper.java new file mode 100644 index 00000000..8547afd7 --- /dev/null +++ b/modello/src/main/org/apache/maven/plugins/modello/ModelloCliWrapper.java @@ -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 Brett Porter + * @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; + } +} diff --git a/modello/src/plugin-test/maven.xml b/modello/src/plugin-test/maven.xml new file mode 100644 index 00000000..747cf54f --- /dev/null +++ b/modello/src/plugin-test/maven.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modello/src/plugin-test/project.properties b/modello/src/plugin-test/project.properties new file mode 100644 index 00000000..d24c3f50 --- /dev/null +++ b/modello/src/plugin-test/project.properties @@ -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 \ No newline at end of file diff --git a/modello/src/plugin-test/project.xml b/modello/src/plugin-test/project.xml new file mode 100644 index 00000000..6a489130 --- /dev/null +++ b/modello/src/plugin-test/project.xml @@ -0,0 +1,86 @@ + + + + 3 + maven + maven-modello-plugin-tests + 1.0 + Test project for Modello + This project is used to test capabilities of the modello plugin + org.apache.maven.model + + + javax.jdo + jdo2-api + 2.0 + + Required for modello JDO/JPOX storage + + + + maven + dom4j + 1.7-20060614 + + Required for modello DOM4J Reader/Writer + + + + org.codehaus.plexus + plexus-utils + 1.0.5 + + Required for modello DOM4J Reader/Writer + + + + stax + stax-api + 1.0.1 + + Required for modello STAX Reader/Writer + + + + net.java.dev.stax-utils + stax-utils + 20060502 + + Required for modello STAX Reader/Writer + + + + jdom + jdom + 1.0 + + Required for modello JDOM Writer + + + + + ${maven.build.dir}/generated-src/main/modello + + + maven-javadoc-plugin + maven-modello-plugin + + diff --git a/modello/src/plugin-test/src/main/mdo/model.mdo b/modello/src/plugin-test/src/main/mdo/model.mdo new file mode 100644 index 00000000..d52595a7 --- /dev/null +++ b/modello/src/plugin-test/src/main/mdo/model.mdo @@ -0,0 +1,3016 @@ + + + + + + maven + Maven + This is a reference for the Maven project descriptor used in Maven.

+

An XSD is available at:

+ + ]]>
+ + + package + org.apache.maven.model + + + + + Model + ModelBase + <project> element is the root of the descriptor. + The following table lists all of the possible child elements. + ]]> + 3.0.0+ + + + extend + 3.0.0 + project.xml file. For example, + <extend>${basedir}/../project.xml</extend>. + ]]> + String + + + parent + 4.0.0 + + + Parent + + + + + modelVersion + 4.0.0 + true + + String + + + pomVersion + 3.0.0 + true + String + + 3.]]> + + + groupId + 3.0.0+ + true + org.apache.maven). + ]]> + String + + + artifactId + 3.0.0+ + true + + String + + + id + 3.0.0 + true + Deprecated. When used, this sets both the groupId and artifactId elements + if they were previously empty. + ]]> + String + + + packaging + 4.0.0 + jar + war + ear + pom. + Plugins can create their own packaging, and + therefore their own packaging types, + so this list does not contain all possible types. + ]]> + String + jar + + + name + 3.0.0+ + true + + String + + + currentVersion + + 3.0.0 + true + String + + + version + 4.0.0 + true + + String + + + shortDescription + 3.0.0 + + String + + + description + 3.0.0+ + + String + + + url + 3.0.0+ + + String + + + logo + 3.0.0 + /images/project-logo.png) or an absolute URL + (e.g., http://my.corp/project-logo.png). This is used + when generating the project documentation. + ]]> + String + + + prerequisites + 4.0.0 + + Describes the prerequisites in the build environment for this project. + + + Prerequisites + + + + issueTrackingUrl + 3.0.0 + + String + + + issueManagement + 4.0.0 + + + IssueManagement + + + + ciManagement + 4.0.0 + + + CiManagement + + + + inceptionYear + 3.0.0+ + true + + String + + + gumpRepositoryId + 3.0.0 + + String + + + siteAddress + 3.0.0 + + String + + + siteDirectory + 3.0.0 + + String + + + distributionSite + 3.0.0 + maven.repo.central and maven.repo.central.directory. + ]]> + String + + + distributionDirectory + 3.0.0 + + String + + + mailingLists + 3.0.0+ + + + MailingList + * + + + + developers + 3.0.0+ + + + Developer + * + + + + contributors + 3.0.0+ + + + Contributor + * + + + + licenses + 3.0.0+ + license element, which + is then described by additional elements. + Projects should only list the license(s) that applies to the project + and not the licenses that apply to dependencies. + If multiple licenses are listed, it is assumed that the user can select any of them, not that they + must accept all. + ]]> + + License + * + + + + versions + 3.0.0 + + + Version + * + + + + branches + 3.0.0 + + + Branch + * + + + + packageGroups + 3.0.0 + + + PackageGroup + * + + + + reports + 3.0.0 + maven site. All of the + reports will be included in the navigation bar for browsing in + the order they are specified. + ]]> + + String + * + + + + scm + 4.0.0 + + + + Scm + + + + repository + 3.0.0 + + + + Repository + + + + organization + 3.0.0+ + + organisation + + Organization + + + + properties + 3.0.0 + <name>value</name>. + ]]> + Properties + + String + * + + + + packageName + 3.0.0 + String + + + + build + 3.0.0+ + true + + + Build + + + + profiles + 4.0.0 + + + Profile + * + + + + + + 3.0.0 + + + + 4.0.0 + + + + + + ModelBase + 3.0.0+ + + + modules + 4.0.0 + + The modules (sometimes called subprojects) to build as a part of this project. + Each module listed is a relative path to the directory containing the module. + + + String + * + + + + repositories + 4.0.0 + + + Repository + * + + + + pluginRepositories + 4.0.0 + + + + Repository + * + + + + dependencies + 3.0.0+ + the + dependency mechanism for more information. + ]]> + + Dependency + * + + + + reports + 4.0.0 + Deprecated. Now ignored by Maven. + ]]> + DOM + + + reporting + 4.0.0 + mvn site. All of the + reports will be included in the navigation bar for browsing. + ]]> + + Reporting + + + + dependencyManagement + 4.0.0 + false + + + DependencyManagement + + + + distributionManagement + 4.0.0 + + + DistributionManagement + + + + properties + 4.0.0 + <name>value</name>. + ]]> + Properties + + String + * + + + + + + Branch + 3.0.0 + + + + tag + 3.0.0 + true + + String + + + + + PluginContainer + 3.0.0+ + + + plugins + 4.0.0 + + The list of plugins to use. + + + Plugin + * + + + + + + 4.0.0 + + + + + + PluginConfiguration + 3.0.0+ + PluginContainer + + + + pluginManagement + 4.0.0 + false + + + PluginManagement + + + + + + BuildBase + 3.0.0+ + PluginConfiguration + + + defaultGoal + 3.0.0+ + + String + + + resources + 3.0.0+ + + + Resource + * + + + + testResources + 4.0.0 + + + Resource + * + + + + directory + 4.0.0 + + String + + + finalName + 4.0.0 + ${artifactId}-${version}. + ]]> + String + + + filters + 4.0.0 + + + String + * + + + + + + Build + 3.0.0+ + BuildBase + + + nagEmailAddress + 3.0.0 + + String + + + sourceDirectory + 3.0.0+ + true + + String + + + scriptSourceDirectory + 4.0.0 + true + + String + + + unitTestSourceDirectory + 3.0.0 + true + + String + + + testSourceDirectory + 4.0.0 + true + + String + + + aspectSourceDirectory + 3.0.0 + + String + + + integrationUnitTestSourceDirectory + 3.0.0 + + String + + + sourceModifications + 3.0.0 + true + + + SourceModification + * + + + + unitTest + 3.0.0 + true + + new UnitTest() + + UnitTest + + + + outputDirectory + 4.0.0 + + String + + + testOutputDirectory + 4.0.0 + + String + + + extensions + 4.0.0 + A set of build extensions to use from this project. + + Extension + * + + + + + + CiManagement + 4.0.0 + + + system + 4.0.0 + + continuum.]]> + String + + + url + 4.0.0 + + + String + + + notifiers + 4.0.0 + + + * + Notifier + + + + + + Notifier + + Configures one method for notifying users/developers when a build breaks. + + 4.0.0 + + + type + 4.0.0 + mail + String + The mechanism used to deliver notifications. + + + sendOnError + 4.0.0 + true + boolean + Whether to send notifications on error. + + + sendOnFailure + 4.0.0 + true + boolean + Whether to send notifications on failure. + + + sendOnSuccess + 4.0.0 + true + boolean + Whether to send notifications on success. + + + sendOnWarning + 4.0.0 + true + boolean + Whether to send notifications on warning. + + + + address + 4.0.0 + String + Deprecated. Where to send the notification to - eg email address. + ]]> + + + configuration + Extended configuration specific to this notifier goes here. + Properties + + String + * + + + + + + Contributor + + Description of a person who has contributed to the project, but who does + not have commit privileges. Usually, these contributions come in the + form of patches submitted. + + 3.0.0+ + + + name + 3.0.0+ + + String + + + email + 3.0.0+ + + String + + + url + 3.0.0+ + + String + + + + organization + organisation + 3.0.0+ + + String + + + organizationUrl + organisationUrl + 3.0.0+ + + String + + + roles + 3.0.0+ + role element, the body of which is a + role name. This can also be used to describe the contribution. + ]]> + + String + * + + + + timezone + 3.0.0+ + + String + + + properties + 3.0.0+ + + Properties + + String + * + + + + + + Dependency + 3.0.0+ + + + id + 3.0.0 + true + Deprecated. Please use groupId and + artifactId together instead. + ]]> + String + + + groupId + 3.0.0+ + true + org.apache.maven. + ]]> + String + + + artifactId + 3.0.0+ + true + maven-artifact. + ]]> + String + + + version + 3.0.0+ + 3.2.1. In Maven 2, this can also be + specified as a range of versions. + ]]> + String + + + url + 3.0.0 + + String + + + jar + 3.0.0 + + String + + + type + 3.0.0 + jar. While it usually represents the extension on + the filename of the dependency, that is not always the case. + Some examples are jar, war, and plugin. + A dependency of type plugin is loaded as a Maven plugin and not added to the project + build classpath. + ]]> + String + jar + + + type + 4.0.0 + jar. While it usually represents the extension on + the filename of the dependency, that is not always the case. A type can be mapped to a different + extension and a classifier. + The type often correspongs to the packaging used, though this is also not always the case. + Some examples are jar, war, ejb-client and test-jar. + New types can be defined by plugins that set + extensions to true, so this is not a complete list. + ]]> + String + jar + + + classifier + 4.0.0 + jdk14 and jdk15. + ]]> + String + false + + + properties + 3.0.0 + war.bundle property, and if found will include the + dependency in WEB-INF/lib. + ]]> + Properties + + String + * + + + + scope + 4.0.0 + compile, runtime, test, + system, and provided. Used to + calculate the various classpaths used for compilation, testing, and so on. It also assists in determining + which artifacts to include in a distribution of this project. For more information, see + the + dependency mechanism.]]> + + String + + + + + systemPath + 4.0.0 + discouraged and may be replaced in later + versions. This specifies the path on the filesystem for this dependency. + Requires an absolute path for the value, not relative. + Use a property that gives the machine specific absolute path, + e.g. ${java.home}. + ]]> + String + + + exclusions + 4.0.0 + + Lists a set of artifacts that should be excluded from this dependency's artifact list when it comes to + calculating transitive dependencies. + + + Exclusion + * + + + + optional + 4.0.0 + + Indicates the dependency is optional for use of this library. While the version of the dependency will be + taken into account for dependency calculation if the library is used elsewhere, it will not be passed on + transitively. + + boolean + false + + + + + 3.0.0 + + + + 4.0.0 + + + + 4.0.0 + + + + 3.0.0 + element is explicity used in the POM. + if ( getJar() != null) + { + return getJar(); + } + + String artifact; + + if ("ejb-client".equals(getType())) { + artifact = getArtifactId() + "-" + getVersion() + "-client." + getExtension(); + } else { + artifact = getArtifactId() + "-" + getVersion() + "." + getExtension(); + } + + return artifact; + } + + public String getTypeDirectory() + { + String path; + if (getType().equals("ejb-client")) { + path = "ejbs"; + } else { + path = getType() + "s"; + } + return path; + } + + public String getExtension() + { + if ("ejb".equals(getType()) || "ejb-client".equals(getType()) || "plugin".equals(getType()) || "aspect".equals(getType()) || "uberjar".equals(getType())) return "jar"; + return getType(); + } + + public boolean isAddedToClasspath() + { + return ("jar".equals(getType()) || "ejb".equals(getType()) || "ejb-client".equals(getType()) || "sar".equals(getType())); + } + + public boolean isPlugin() + { + return ("plugin".equals(getType())); + } + + public String getProperty( String property ) + { + return getProperties().getProperty( property ); + } + + public boolean equals( Object o ) + { + if ( this == o ) + { + return true; + } + + if ( !( o instanceof Dependency ) ) + { + return false; + } + + Dependency d = (Dependency) o; + return getId().equals( d.getId() ); + } + + public int hashCode() + { + return getId().hashCode(); + } + ]]> + + + + + Contributor + Developer + + 3.0.0+ + + + id + 3.0.0+ + + String + + + + + Exclusion + 4.0.0 + + + artifactId + 4.0.0 + + String + true + + + groupId + 4.0.0 + + String + true + + + + + IssueManagement + + Information about the issue tracking (or bug tracking) system used to manage this project. + + 4.0.0 + + + system + 4.0.0 + + String + + + url + 4.0.0 + + String + + + + + DistributionManagement + 4.0.0 + + + + repository + 4.0.0 + + + DeploymentRepository + + + + snapshotRepository + 4.0.0 + repository element. + ]]> + + DeploymentRepository + + + + site + + 4.0.0 + + Site + + + + downloadUrl + 4.0.0+ + url. This is given to assist in locating artifacts that are not in the repository due to + licensing restrictions. + ]]> + String + + + relocation + 4.0.0 + + Relocation information of the artifact if it has been moved to a new group ID and/or artifact ID. + + + Relocation + + + + status + 4.0.0 + none (default), + converted (repository manager converted this from an Maven 1 POM), partner + (directly synced from a partner Maven 2 repository), deployed (was deployed from a Maven 2 + instance), verified (has been hand verified as correct and final). + ]]> + false + String + + + + + License + + 3.0.0+ + + + name + 3.0.0+ + + String + + + url + 3.0.0+ + + String + + + distribution + 3.0.0+ + +
repo
+
may be downloaded from the Maven repository
+
manual
+
user must manually download and install the dependency.
+ + ]]>
+ String +
+ + comments + + Addendum information pertaining to this license. + + 3.0.0+ + String + +
+
+ + MailingList + 3.0.0+ + + + + name + 3.0.0+ + + String + + + subscribe + 3.0.0+ + mailto: link will automatically be created when + the documentation is created. + ]]> + String + + + unsubscribe + 3.0.0+ + mailto: link will automatically be created + when the documentation is created. + ]]> + String + + + post + 3.0.0+ + mailto: link will automatically be created + when the documentation is created. + ]]> + String + + + archive + 3.0.0+ + + String + + + otherArchives + 3.0.0+ + + + String + * + + + + + We could probably have a specific element for a dev mailing list for + things like CI, and maybe even a specific element for the user and scm + mailing lists. Then leave the more lose structure for any other type + of mailing list. + + + + Organization + Specifies the organization that produces this project. + 3.0.0+ + + + name + 3.0.0+ + + String + + + url + 3.0.0+ + + String + + + logo + 3.0.0 + /images/org-logo.png) or an absolute URL + (e.g., http://my.corp/logo.png). This value is used + when generating the project documentation. + ]]> + String + + + + + PackageGroup + 3.0.0 + A JavaDoc package group. + + + title + 3.0.0 + + String + + + packages + 3.0.0 + + String + + + + + PatternSet + 3.0.0+ + + + includes + 3.0.0+ + **/*.xml.]]> + + String + * + + + + excludes + 3.0.0+ + **/*.xml]]> + + String + * + + + + + + Parent + 4.0.0 + + + artifactId + 4.0.0 + + true + String + + + groupId + 4.0.0 + + true + String + + + version + 4.0.0 + + String + + + relativePath + 4.0.0 + pom.xml file within the check out. + The default value is ../pom.xml. + Maven looks for the parent pom first in the reactor of currently building projects, then in this location on + the filesystem, then the local repository, and lastly in the remote repo. + relativePath allows you to select a different location, + for example when your structure is flat, or deeper without an intermediate parent pom. + However, the group ID, artifact ID and version are still required, + and must match the file in the location given or it will revert to the repository for the POM. + This feature is only for enhancing the development in a local checkout of that project. + ]]> + String + ../pom.xml + + + + + 4.0.0 + + + + + + + Repository + 3.0.0 + + + connection + 3.0.0 + URL format + and list of supported SCMs. + This connection is read-only. + ]]> + String + + + developerConnection + 3.0.0 + connection, but for developers, i.e. this scm connection + will not be read only. + ]]> + String + + + url + 3.0.0 + + + String + + + + + Scm + 4.0.0 + + + connection + 4.0.0 + URL format + and list of supported SCMs. + This connection is read-only. + ]]> + String + + + developerConnection + 4.0.0 + connection, but for developers, i.e. this scm connection + will not be read only. + ]]> + String + + + tag + 4.0.0 + + String + HEAD + + + url + 4.0.0 + + + String + + + + + FileSet + 3.0.0+ + PatternSet + + + directory + 3.0.0+ + + String + + + + + Resource + + 3.0.0+ + FileSet + + + targetPath + 3.0.0+ + org.apache.maven.messages), you must specify this + element with this value: org/apache/maven/messages. + This is not required if you simply put the resources in that directory structure at the source, however. + ]]> + String + + + filtering + 3.0.0+ + properties element and from the properties in the files listed + in the filters element. + ]]> + boolean + false + + + + + SourceModification + + 3.0.0 + FileSet + + + className + 3.0.0 + not be + loaded, then the includes and excludes specified below + will be applied to the contents of the sourceDirectory. + ]]> + String + + + property + 3.0.0 + not set, + then the includes and excludes specified below + will be applied to the contents of the sourceDirectory. + ]]> + String + + + + + UnitTest + 3.0.0 + PatternSet + + + resources + 3.0.0 + + + Resource + * + + + + + + Version + 3.0.0 + version + element + ]]> + + + name + 3.0.0 + 1.0, + 1.1-alpha1, + 1.2-beta, + 1.3.2 etc. + ]]> + String + + + tag + 3.0.0 + + String + + + id + 3.0.0 + + String + + + + + 3.0.0 + + + + + + + RepositoryBase + 4.0.0 + + + + id + 4.0.0 + settings.xml file, for example. + ]]> + String + + + name + 4.0.0 + + String + + + url + 4.0.0 + protocol://hostname/path. + ]]> + String + + + layout + 4.0.0 + legacy or + default. + ]]> + String + default + + + + + 4.0.0 + + + + + + + Repository + RepositoryBase + 4.0.0 + + A repository contains the information needed for establishing connections with remote repoistory. + + + + releases + 4.0.0 + How to handle downloading of releases from this repository. + + RepositoryPolicy + + + + snapshots + 4.0.0 + How to handle downloading of snapshots from this repository. + + RepositoryPolicy + + + + + + + 4.0.0 + + + + + + + DeploymentRepository + RepositoryBase + 4.0.0 + + Repository contains the information needed for deploying to the remote repoistory. + + + + uniqueVersion + Whether to assign snapshots a unique version comprised of the timestamp and build number, or to + use the same version each time + boolean + true + 4.0.0 + + + + + + 4.0.0 + + + + + + + RepositoryPolicy + 4.0.0 + Download policy + + + enabled + 4.0.0 + Whether to use this repository for downloading this type of artifact. + boolean + true + + + updatePolicy + 4.0.0 + always, + daily + (default), + interval:XXX + (in minutes) or + never + (only if it doesn't exist locally). + ]]> + String + + + checksumPolicy + 4.0.0 + ignore + , + fail + or + warn + (the default). + ]]> + String + + + + + + + Site + 4.0.0 + + + + id + 4.0.0 + settings.xml file, for example. + ]]> + String + + + name + 4.0.0 + + String + + + url + 4.0.0 + protocol://hostname/path. + ]]> + String + + + + + + ConfigurationContainer + 4.0.0 + + + inherited + 4.0.0 + + + String + + + configuration + DOM + + + + + 4.0.0 + + + + + + Plugin + 4.0.0 + ConfigurationContainer + + + groupId + The group ID of the plugin in the repository. + 4.0.0 + String + org.apache.maven.plugins + + + artifactId + The artifact ID of the plugin in the repository. + 4.0.0 + String + true + + + version + 4.0.0 + + String + + + extensions + 4.0.0 + boolean + Whether to load Maven extensions (such as packaging and type handlers) from this + plugin. For performance reasons, this should only be enabled when necessary. + false + + + executions + 4.0.0 + Multiple specifications of a set of goals to execute during the build lifecycle, each having + (possibly) different + configuration. + + PluginExecution + * + + + + dependencies + Additional dependencies that this project needs to introduce to the plugin's + classloader. + 4.0.0 + + Dependency + * + + + + goals + 4.0.0 + Deprecated. Unused by Maven. + ]]> + DOM + + + + + 4.0.0 + elements.\nOffending execution\n\nId: \'" + exec.getId() + "\'\nPlugin:\'" + getKey() + "\'\n\n" ); + } + + executionMap.put( exec.getId(), exec ); + } + } + } + + return executionMap; + } + + public String getKey() + { + return constructKey( groupId, artifactId ); + } + + public static String constructKey( String groupId, String artifactId ) + { + return groupId + ":" + artifactId; + } + + public boolean equals( Object other ) + { + if ( other instanceof Plugin ) + { + Plugin otherPlugin = (Plugin) other; + + return getKey().equals( otherPlugin.getKey() ); + } + + return false; + } + + public int hashCode() + { + return getKey().hashCode(); + } + + public String toString() + { + return "Plugin [" + getKey() + "]"; + } + ]]> + + + + + PluginExecution + 4.0.0 + ConfigurationContainer + + + id + 4.0.0 + String + default + The identifier of this execution for labelling the goals during the build, and for matching + exections to merge during inheritance. + + + phase + 4.0.0 + String + The build lifecycle phase to bind the goals in this execution to. If omitted, the goals will + be bound to the default specified in their metadata. + + + goals + 4.0.0 + The goals to execute with the given configuration. + + String + * + + + + + + 4.0.0 + + + + + + DependencyManagement + 4.0.0 + + Section for management of default dependency information for use in a group of POMs. + + + + dependencies + 4.0.0 + + The dependencies specified here are not used until they + are referenced in a POM within the group. This allows the + specification of a "standard" version for a particular + dependency. + + + Dependency + * + + + + + + PluginManagement + 4.0.0 + PluginContainer + + Section for management of default plugin information for use in a group of POMs. + + + + Reporting + 4.0.0 + Section for management of reports and their configuration. + + + excludeDefaults + 4.0.0 + boolean + If true, then the default reports are not included in the site generation. This includes the + reports in the "Project Info" menu. + false + + + outputDirectory + 4.0.0 + String + ${project.build.directory}/site + . + ]]> + + + + plugins + 4.0.0 + The reporting plugins to use and their configuration. + + ReportPlugin + * + + + + + + 4.0.0 + + + + + + + Profile + ModelBase + 4.0.0 + + + + id + true + 4.0.0 + String + The identifier of this build profile. This used both for command line activation, and identifies + identical profiles to merge with during inheritance. + + + activation + 4.0.0 + + + Activation + + + + build + 4.0.0 + true + + + BuildBase + + + + + + 4.0.0 + + + + + + Activation + 4.0.0 + + + + activeByDefault + 4.0.0 + boolean + Flag specifying whether this profile is active by default. + + + jdk + 4.0.0 + String + 1.4 + only activates on JDKs versioned 1.4, while !1.4 matches any JDK that is not version 1.4. + ]]> + + + os + 4.0.0 + + + ActivationOS + + + + property + 4.0.0 + + + ActivationProperty + + + + file + 4.0.0 + + + ActivationFile + + + + + + ActivationProperty + 4.0.0 + + + + name + 4.0.0 + String + true + The name of the property to be used to activate a profile. + + + value + 4.0.0 + String + The value of the property required to activate a profile. + + + + + ActivationOS + 4.0.0 + + + + name + 4.0.0 + String + ${os.name} Java property, such as Windows XP.]]> + + + family + 4.0.0 + String + + windows or unix.]]> + + + arch + 4.0.0 + String + The architecture of the operating system to be used to activate the profile. + + + version + 4.0.0 + String + The version of the operating system to be used to activate the profile. + + + + + ActivationFile + 4.0.0 + + + + missing + 4.0.0 + String + The name of the file that must be missing to activate the profile. + + + exists + 4.0.0 + String + The name of the file that must exist to activate the profile. + + + + + + ReportPlugin + 4.0.0 + + + groupId + 4.0.0 + String + true + org.apache.maven.plugins + The group ID of the reporting plugin in the repository. + + + artifactId + 4.0.0 + String + true + The artifact ID of the reporting plugin in the repository. + + + version + 4.0.0 + + String + + + inherited + 4.0.0 + String + Whether the configuration in this plugin should be made available to projects that + inherit from this one. + + + configuration + 4.0.0 + DOM + The configuration of the reporting plugin. + + + reportSets + 4.0.0 + execution in the build.]]> + + ReportSet + * + + + + + + 4.0.0 + + + + + + ReportSet + 4.0.0 + Represents a set of reports and configuration to be used to generate them. + + + id + String + true + The unique id for this report set, to be used during POM inheritance. + default + + + configuration + 4.0.0 + Configuration of the report to be used when generating this set. + DOM + + + inherited + 4.0.0 + String + + + + + reports + 4.0.0 + true + + + String + * + + + + + + 4.0.0 + + + + + + Prerequisites + 4.0.0 + Describes the prerequisites a project can have. + + + maven + 4.0.0 + String + 2.0 + The minimum version of Maven required to build the project, or to use this plugin. + false + + + + + Relocation + 4.0.0 + Describes where an artifact has moved to. If any of the values are omitted, it is assumed to be the + same as it was before. + + + groupId + 4.0.0 + The group ID the artifact has moved to. + String + + + artifactId + 4.0.0 + The new artifact ID of the artifact. + String + + + version + 4.0.0 + The new version of the artifact. + String + + + message + 4.0.0 + An additional message to show the user about the move, such as the reason. + String + + + + + Extension + 4.0.0 + Describes a build extension to utilise. + + + groupId + 4.0.0 + The group ID of the extension's artifact. + true + String + + + artifactId + 4.0.0 + The artifact ID of the extension. + true + String + + + version + 4.0.0 + The version of the extension. + String + + + + + 4.0.0 + + + + +
+
+ diff --git a/modello/xdocs/changes.xml b/modello/xdocs/changes.xml new file mode 100644 index 00000000..2ec0e20a --- /dev/null +++ b/modello/xdocs/changes.xml @@ -0,0 +1,59 @@ + + + + + + Changes + Arnaud Heritier + + + + New site report (maven-modello-plugin) to generate the model documentation and the XML schema. + New goal modello:xsd + New goals modello:jpox and modello:jpox-metadata-class + New goals modello:jdom, and modello:jdom-writer + New goals modello:dom4j, modello:dom4j-reader and modello:dom4j-writer + New goals modello:stax, modello:stax-reader and modello:stax-writer + Automatically verify required properties. + Add a test to validate generations from modello plugins. + New property maven.modello.plugins to select plugins to call for the goal modello:modello + The property maven.modello.targetDirectory is replaced by maven.modello.java.targetDirectory,maven.modello.xsd.targetDirectory, and maven.modello.xdoc.targetDirectory + The plugin is now based on modello libraries 1.0-alpha-14. + Add plugin documentation and refactor web site. + + + Fix web site address + + + New goals modello:jpox-store and modello:jpox-jdo-mapping + New goal modello:xdoc + New goals modello:xpp3-reader and modello:xpp3-writer + New property maven.modello.targetDirectory + New property maven.modello.version + New property maven.modello.packageWithVersion + New property maven.modello.model + New goal modello:xpp3 + New goal modello:java + New goals modello and modello:modello + New jelly tag modello:generate + Initiate the plugin based on modello libraries 1.0-alpha-2 + + + diff --git a/modello/xdocs/goals.xml b/modello/xdocs/goals.xml new file mode 100644 index 00000000..4e0b8ee9 --- /dev/null +++ b/modello/xdocs/goals.xml @@ -0,0 +1,128 @@ + + + + + Goals + Arnaud Heritier + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GoalDescription
modelloDefault goal for the plugin. It calls modello:modello.
modello:modelloCode generation based on the property maven.modello.plugins. Each plugin listed in this property is called as a goal modello:pluginName. If maven.modello.plugins=java,stax,jpox a call to modello(:modello) will call goals modello:java, modello:stax, modello:jpox.
modello:javaGenerates Java Pojos of the DataModel in the directory ${maven.modello.java.targetDirectory}.
Java - XML Mappings
modello:dom4jGenerates classes in the directory ${maven.modello.java.targetDirectory} to read/write the model from/into a xml file using Dom4j.
modello:dom4j-readerGenerates the class in the directory ${maven.modello.java.targetDirectory} to read the model from a xml file using Dom4j.
modello:dom4j-writerGenerates the class in the directory ${maven.modello.java.targetDirectory} to write the model into a xml file using Dom4j.
modello:jdomGenerates classes in the directory ${maven.modello.java.targetDirectory} to write the model into a xml file using JDom.
modello:jdom-writerGenerates classes in the directory ${maven.modello.java.targetDirectory} to write the model into a xml file using JDom.
modello:staxGenerates classes in the directory ${maven.modello.java.targetDirectory} to read/write the model from/into a xml file using STAX RI.
modello:stax-readerGenerates the class in the directory ${maven.modello.java.targetDirectory} to read the model from a xml file using STAX RI.
modello:stax-writerGenerates the class in the directory ${maven.modello.java.targetDirectory} to write the model into a xml file using STAX RI.
modello:xpp3Generates classes in the directory ${maven.modello.java.targetDirectory} to read/write the model from/to a xml file using Xpp3.
modello:xpp3-readerGenerates the class in the directory ${maven.modello.java.targetDirectory} to read the model from a xml file using Xpp3.
modello:xpp3-writerGenerates the class in the directory ${maven.modello.java.targetDirectory} to write the model into a xml file using Xpp3.
Java - Database Storage
modello:jpoxGenerates classes in the directory ${maven.modello.java.targetDirectory} to read/store the model in a database using JPox.
modello:jpox-jdo-mappingGenerates in the directory ${maven.modello.java.targetDirectory} the JOD mapping for JPox (package.jdo).
modello:jpox-metadata-classGenerates in the directory ${maven.modello.java.targetDirectory} MetaData class for JPox.
modello:jpox-storeGenerates in the directory ${maven.modello.java.targetDirectory} the JPox code to do the persistence of the model in a DB.
Documentation and validation
modello:xsdGenerates an XML Schema in the directory ${maven.modello.xsd.targetDirectory} for the xml file used to store the model.
modello:xdocGenerates a xdoc file in the directory ${maven.modello.xdoc.targetDirectory} to document the model.
+
+ +
\ No newline at end of file diff --git a/modello/xdocs/index.xml b/modello/xdocs/index.xml new file mode 100644 index 00000000..a3c19e83 --- /dev/null +++ b/modello/xdocs/index.xml @@ -0,0 +1,74 @@ + + + + + Overview + Arnaud Heritier + + +
+ +

Modello is a Data Model toolkit.

+

From a DataModel defined in XML, Modello can generate any of the following at compile time:

+
    +
  • Java Pojos of the DataModel.
  • +
  • Java Pojos to XML Writer. (provided via xpp3, stax, jdom or dom4j)
  • +
  • XML to Java Pojos Reader. (provided via xpp3, stax or dom4j)
  • +
  • Java Model to JPOX Store.
  • +
  • Java Model to JPOX Mapping.
  • +
  • Xdoc documentation of the DataModel.
  • +
  • XML Schema to validate data.
  • +
  • and more in the future...
  • +
+
+ +

This plugin allows you to integrate modello services in your build to automatically (or manually) generate the code and the documentation from the DataModel.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
DocumentDescription
InstallationHow to install this plugin?
UsageHow to use this plugin?
GoalsGoals documentation.
PropertiesProperties documentation.
ChangesChanges in each release of this plugin.
+
+
+ +
diff --git a/modello/xdocs/install.xml b/modello/xdocs/install.xml new file mode 100644 index 00000000..70f859cf --- /dev/null +++ b/modello/xdocs/install.xml @@ -0,0 +1,55 @@ + + +--> + + + Installation + Arnaud Heritier + + + +
+

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).

+

We suppose that CURRENT_VERSION is the version of the plugin you want to use. The changes report gives you the list of versions actually available.

+

If you want to use a SNAPSHOT of this plugin, you'll certainly have to add the following remote repositories in your settings (property maven.repo.remote) :

+
    +
  • http://snapshots.dist.codehaus.org/modello/ : To acquire snapshots of modello.
  • +
  • http://people.apache.org/repo/m1-snapshot-repository/ : To acquire snapshots of the modello plugin for m1.
  • +
+ + +

To install it locally, you just have to launch this command :

+ maven plugin:download -DgroupId=maven -DartifactId=maven-modello-plugin -Dversion=CURRENT_VERSION +

You have to do it on all installations of maven 1 which will be used to build your project.

+
+ +

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 :

+ + maven + maven-modello-plugin + CURRENT_VERSION + plugin +]]> +
+
+ + +
diff --git a/modello/xdocs/navigation.xml b/modello/xdocs/navigation.xml new file mode 100644 index 00000000..26d57be4 --- /dev/null +++ b/modello/xdocs/navigation.xml @@ -0,0 +1,42 @@ + + + + Maven Modello Plugin + + + + + + + + + + + + + + + + + + + + + diff --git a/modello/xdocs/properties.xml b/modello/xdocs/properties.xml new file mode 100644 index 00000000..6f15bbcc --- /dev/null +++ b/modello/xdocs/properties.xml @@ -0,0 +1,100 @@ + + + + + Properties + Arnaud Heritier + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyOptional?Description
maven.modello.versionNo +

This property must be set to to tell to modello which version of the model must be used.

+

Default value is empty.

+
maven.modello.packageWithVersionNo +

This property must be set to true or false to tell to modello to generate a package name with the version of the model.

+

Default value is empty.

+
maven.modello.packageYes +

Replaces the default package defined in the model.

+

Default value is empty.

+
maven.modello.pluginsYes +

This is the list of modello plugins to use when the goal modello(:modello) is used. Each plugin has it's own goal in this plugin : modello:java, modello:stax, modello:xpp3 (See the list of goals to find all the possible values).

+

Default value is java,xdoc.

+
maven.modello.xsd.targetDirectoryYes +

Directory in which is generated the xml schema to validate instances of the model (goal modello:xsd).

+

Default value is ${maven.gen.docs}.

+
maven.modello.java.targetDirectoryYes +

Directory in which are generated java sources from modello plugins : java, xpp3, ... .

+

Default value is ${maven.build.dir}/generated-src/main/modello.

+
maven.modello.xdoc.targetDirectoryYes +

Directory in which is generated the xdoc to document the model (goal modello:xdoc).

+

Default value is ${maven.gen.docs}.

+
maven.modello.modelYes +

The path to the modello model to use.

+

Default value is ${basedir}/src/main/resources/model.mdo.

+
+
+ +
\ No newline at end of file diff --git a/modello/xdocs/usage.xml b/modello/xdocs/usage.xml new file mode 100644 index 00000000..37c148d7 --- /dev/null +++ b/modello/xdocs/usage.xml @@ -0,0 +1,58 @@ + + + + + Usage + Arnaud Heritier + + + +
+ +
    +
  1. You have to define your own model in your project in a file named ${basedir}/src/main/resources/model.mdo (property maven.modello.model). NOTE : Actually the plugin allow to have only one model per project.
  2. +
  3. You have also to set the properties maven.modello.packageWithVersion and maven.modello.version.
  4. +
+
+ +

After having change your properties to customize the behaviour of modello, you can call any goal in this plugin. To have the full list of goals you must call maven -P modello.

+
+ +

You can automatically call modello in your build.

+

As a pregoal of java:compile to generate your code. The modello goal uses the property maven.modello.plugins to know which modello plugins it have to use.

+ + + + + ]]> +

As a report for the web site. It will automatically generate the documentation and the xml schema for your model

+ + ... + maven-modello-plugin + ... + + ]]> +
+
+ + +