Initial revision

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162574 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-03-08 01:31:17 +00:00
parent 323b3bdaab
commit 188fc98355
5 changed files with 641 additions and 0 deletions

9
maven-model/.cvsignore Normal file
View File

@ -0,0 +1,9 @@
*.log
target
.classpath
.project
default.lst
test.out
default.ajsym
*.ipr
*.iws

13
maven-model/build.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Generate the sources from the model
modello --model=maven.mdo --mode=java --dir=src/main/java
# Build the sources
mboot
# Generate XML Schema
modello --model=maven.mdo --mode=xsd --dir=.
# Generate XDoc
modello --model=maven.mdo --mode=xdoc --dir=.

558
maven-model/maven.mdo Normal file
View File

@ -0,0 +1,558 @@
<model>
<name>Maven</name>
<description>the description</description>
<packageName>org.apache.maven.model</packageName>
<classes>
<class>
<name>Model</name>
<fields>
<field>
<name>extend</name>
<description>The model you wish this model to extend.</description>
<type>String</type>
</field>
<field>
<name>modelVersion</name>
<description>The version of this model.</description>
<type>String</type>
</field>
<field>
<name>groupId</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>artifactId</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>name</name>
<description>Human readable name of the project.</description>
<type>String</type>
</field>
<field>
<name>version</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>shortDescription</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>description</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>type</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>url</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>logo</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>issueTrackingUrl</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>inceptionYear</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>gumpRepositoryId</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>siteAddress</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>siteDirectory</name>
<description>the description</description>
<type>String</type>
</field>
<!-- This naming is inconsistent -->
<field>
<name>distributionSite</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>distributionDirectory</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>mailingLists</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>developers</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>contributors</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>dependencies</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>licenses</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>versions</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>branches</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>packageGroups</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>reports</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>versionMap</name>
<description>the description</description>
<type>java.util.Map</type>
<defaultValue>new HashMap()</defaultValue>
</field>
<field>
<name>repository</name>
<description>the description</description>
<type>Repository</type>
</field>
<field>
<name>build</name>
<description>the description</description>
<type>Build</type>
</field>
<field>
<name>organization</name>
<description>the description</description>
<type>Organization</type>
</field>
</fields>
<!-- We need this because we can't use package as a field name. -->
<code>
private String packageName;
public void setPackage(String packageName)
{
this.packageName = packageName;
}
public String getPackage()
{
return packageName;
}
public String getId()
{
StringBuffer id = new StringBuffer();
id.append( getGroupId() );
id.append( ":" );
id.append( getArtifactId() );
id.append( ":" );
id.append( getType() );
return id.toString();
}
public void setId( String id )
{
int i = id.indexOf( "+" );
int j = id.indexOf( ":" );
if ( i > 0 )
{
setGroupId( id.substring( 0, i ) );
setArtifactId( id.replace( '+', '-' ) );
}
else if ( j > 0 )
{
setGroupId( id.substring( 0, j ) );
setArtifactId( id.substring( j + 1 ) );
}
else
{
setGroupId( id );
setArtifactId( id );
}
}
</code>
</class>
<class>
<name>Branch</name>
<fields>
<field>
<name>tag</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>Build</name>
<fields>
<field>
<name>nagEmailAddress</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>sourceDirectory</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>unitTestSourceDirectory</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>aspectSourceDirectory</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>sourceModifications</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>unitTest</name>
<description>the description</description>
<type>UnitTest</type>
<defaultValue>new UnitTest()</defaultValue>
</field>
<field>
<name>resources</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
</fields>
</class>
<class>
<name>Contributor</name>
<fields>
<field>
<name>name</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>email</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>url</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>organization</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>roles</name>
<description>the description</description>
<type>java.util.SortedSet</type>
<defaultValue>new TreeSet()</defaultValue>
</field>
</fields>
</class>
<class>
<name>Dependency</name>
<fields>
<field>
<name>groupId</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>artifactId</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>version</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>url</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>artifact</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>type</name>
<description>The type of dependency.</description>
<type>String</type>
<defaultValue>jar</defaultValue>
</field>
<field>
<name>properties</name>
<description>Properties for this dependency.</description>
<type>java.util.Properties</type>
<defaultValue>new Properties()</defaultValue>
</field>
</fields>
<code>
public String getId()
{
return groupId + ":" + artifactId;
}
</code>
</class>
<class>
<superClass>Contributor</superClass>
<name>Developer</name>
<fields>
<field>
<name>id</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>License</name>
<fields>
<field>
<name>name</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>url</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>distribution</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>comments</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>MailingList</name>
<fields>
<field>
<name>name</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>subscribe</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>unsubscribe</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>archive</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>Organization</name>
<fields>
<field>
<name>name</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>url</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>logo</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>PackageGroup</name>
<fields>
<field>
<name>title</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>packages</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>PatternSet</name>
<fields>
<field>
<name>includes</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
<field>
<name>excludes</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
</fields>
</class>
<class>
<name>Repository</name>
<fields>
<field>
<name>connection</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>developerConnection</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>url</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>Resource</name>
<superClass>PatternSet</superClass>
<fields>
<field>
<name>directory</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>targetPath</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>filtering</name>
<description>the description</description>
<type>boolean</type>
</field>
</fields>
</class>
<class>
<name>SourceModification</name>
<superClass>Resource</superClass>
<fields>
<field>
<name>className</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>property</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>UnitTest</name>
<superClass>PatternSet</superClass>
<fields>
<field>
<name>resources</name>
<description>the description</description>
<type>java.util.List</type>
<defaultValue>new ArrayList()</defaultValue>
</field>
</fields>
</class>
<class>
<name>Version</name>
<fields>
<field>
<name>name</name>
<description>the description</description>
<type>String</type>
</field>
<field>
<name>tag</name>
<type>String</type>
</field>
<field>
<name>id</name>
<description>the description</description>
<type>String</type>
</field>
</fields>
</class>
</classes>
</model>

1
maven-model/maven.xml Normal file
View File

@ -0,0 +1 @@
<project default="jar"/>

60
maven-model/project.xml Normal file
View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<pomVersion>3</pomVersion>
<name>Maven Model</name>
<groupId>maven</groupId>
<id>maven-model</id>
<artifactId>maven-model</artifactId>
<currentVersion>2.0-SNAPSHOT</currentVersion>
<gumpRepositoryId>jakarta</gumpRepositoryId>
<description>Maven is a project management and project comprehension tool. Maven is based on the concept of a project object model: builds, documentation creation, site publication, and distribution publication are all controlled from the project object model. Maven also provides tools to create source metrics, change logs based directly on source repository, and source cross-references.</description>
<shortDescription>Java Project Management Tools</shortDescription>
<versions/>
<branches/>
<developers>
<developer>
<name>Jason van Zyl</name>
<id>jvanzyl</id>
<email>jason@zenplex.com</email>
<organization>Zenplex</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
<developer>
<name>Brett Porter</name>
<id>brett</id>
<email>brett@apache.org</email>
<organization>f2 network</organization>
<roles>
<role>Java Developer</role>
</roles>
<timezone>+10</timezone>
</developer>
</developers>
<contributors/>
<dependencies>
</dependencies>
<build>
<nagEmailAddress>dev@maven.apache.org</nagEmailAddress>
<sourceDirectory>src/main/java</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
</build>
<reports>
<report>maven-changelog-plugin</report>
<report>maven-javadoc-plugin</report>
<report>maven-jxr-plugin</report>
</reports>
</project>