You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jason van Zyl <jv...@zenplex.com> on 2002/03/27 18:37:16 UTC

Re: [maven] project descriptor qns

On Wed, 2002-03-27 at 13:36, dion@multitask.com.au wrote:
> First of all, let me say how fantastic Maven is. I am impressed with the 
> quality of the documentation, the ease of which the product can be set up 
> and the features available at such an early point in the product's 
> lifecycle.

Thanks!

> Second of all, I'm trying Maven out and I'm trying to find out some more 
> info on the <dependency> tag. In particular, where the list of known 
> <name>s are, and what the known values for the <type>s are.

The <name>'s are the same as the gump one's which is where I'm getting
the information. I will try to improve the documentation. We're
suffering growing pains.

Right now they are the <type>'s are

required
documentation

But really what we are shooting for being able to simply state a
projects direct dependencies and let maven figure out the indirect
runtime dependencies by using the dependency graph.

> Also, well done on the L&F. I'm hoping to use it on a Commons project and 
> hopefully doing so will encourage others to adopt it too.

That is thanks to Todd at Collab. Daniel Rall setup a project
(style.tigris.org) so that as improvements are made to the stylesheets
they will be propogated on to maven users. We have some pretty good
collaboration going on. 
 
> Anything I can do to help, just let me know.

I saw you had some release process documentation that would be nice to
integrate into maven's growing collection of development process
documentation :-) We'll take any process docs you have!

> --
> dIon Gillard, Multitask Consulting
> Work:      http://www.multitask.com.au
> Developers: http://adslgateway.multitask.com.au/developers
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [maven] project descriptor qns

Posted by Jason van Zyl <jv...@zenplex.com>.
On Thu, 2002-03-28 at 13:09, Daniel Rall wrote:
> Jason van Zyl <jv...@zenplex.com> writes:
> 
> > On Wed, 2002-03-27 at 21:57, Daniel Rall wrote:
> > > A DTD for the Maven project descriptor would answer a lot of these
> >> questions.  What do you think?
> >
> > Looks good. I'm using XML Authority to make a schema but this will
> > definitely answer peoples questions about the structure. I imagine this
> > might change here and there but I don't think it will change radically.
> > Pop it in the site!
> 
> Okay.  Any particular place I should put it (I currently have it under
> maven/xdocs/)?  

How about something like src/validate or something like that as we'll
probably use it soon to catch goofs made in the XML version of the
descriptor.

We can also put Jeff's relax-ng schema there as well. When I'm finished
with the docs I'm writing and fire up XML Authority and pop in some
stuff and try and sync up all the validators (not sure if XML Authority
does relax-ng).

> Also, I didn't do any validation on it -- can someone
> a suggest a tool for doing so (on Linux)?  Though I can write DTDs
> just fine (they just look like any other schema to me), I don't
> actually use them that often, and when I do there has generally been a
> pre-existing framework for doing so (yay Torque!).
> 
> - Dan
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [maven] project descriptor qns

Posted by Rajeev Kaul <Ra...@customercaresolutions.com>.
I have attached an XML Schema version of  Dan's DTD for Maven, below.  Many
of the element types that are currently defined as string could be further
refined to a specific type such as boolean, integer, etc.  However, I will
leave that to folks who are more experienced with Maven.  I merely,
translated the DTD submitted by Dan.

<schema
  xmlns="http://www.w3.org/2000/10/XMLSchema"
  targetNamespace="http://www.apache.org/maven/"
  xmlns:mn="http://www.apache.org/maven/">

 <element name="project">
  <complexType>
   <sequence>
    <element ref="mn:name"/>
    <element ref="mn:id"/>
    <element ref="mn:currentVersion"/>
    <element ref="mn:organization" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:inceptionYear"/>
    <element ref="mn:package"/>
    <element ref="mn:shortDescription"/>
    <element ref="mn:gumpRepositoryId" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:description" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:url"/>
    <element ref="mn:cvsWebUrl" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:siteAddress" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:siteDirectory" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:distributionDirectory" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:distributions"/>
    <element ref="mn:branches"/>
    <element ref="mn:mailingLists"/>
    <element ref="mn:developers"/>
    <element ref="mn:dependencies"/>
    <element ref="mn:build"/>
   </sequence>
  </complexType>
 </element>

 <element name="archive" type="string"/>

 <element name="id" type="string"/>

 <element name="currentVersion" type="string"/>

 <element name="organization" type="string"/>

 <element name="inceptionYear" type="gYear"/>

 <element name="package" type="string"/>

 <element name="gumpRepositoryId" type="string"/>

 <element name="description" type="string"/>

 <element name="url" type="anyURI"/>

 <element name="cvsWebUrl" type="anyURI"/>

 <element name="siteAddress" type="anyURI"/>

 <element name="siteDirectory" type="string"/>

 <element name="distributionDirectory" type="string"/>

 <element name="version" type="string"/>

 <element name="tag" type="string"/>

 <element name="name" type="string"/>

 <element name="subscribe" type="string"/>

 <element name="unsubscribe" type="string"/>

 <!-- declare email type using regular expression for an email address -->
 <simpleType name="emailType">
  <restriction base="xsd:string">
        <pattern
value="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-z
A-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"/>
  </restriction>
 </simpleType>

 <element name="email" type="emailType"/>

 <element name="type" type="string"/>

 <element name="homepage" type="anyURI"/>

 <element name="sourceDirectory" type="string"/>

 <element name="testSourceDirectory" type="string"/>

 <element name="aspecteSourceDirectory" type="string"/>

 <element name="unitTestClassEntry" type="string"/>

 <element name="integrationUnitTestClassEntry" type="string"/>

 <element name="jarResource" type="string"/>

 <element name="jar" type="string"/>


 <element name="distributions">
  <complexType>
   <sequence>
    <element ref="mn:ditribution" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="distribution">
  <complexType>
   <sequence>
    <element ref="mn:version"/>
    <element ref="mn:tag"/>
   </sequence>
  </complexType>
 </element>

 <element name="branches">
  <complexType>
   <sequence>
    <element ref="mn:branch" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="branch">
  <complexType>
    <element ref="mn:tag"/>
  </complexType>
 </element>

 <element name="mailingLists">
  <complexType>
   <sequence>
     <element ref="mn:mailingList" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="mailingList">
  <complexType>
   <sequence>
    <element ref="mn:name"/>
    <element ref="mn:subscribe"/>
    <element ref="mn:unsubscribe"/>
    <element ref="mn:archive" minOccurs="0" maxOccurs="1"/>
   </sequence>
  </complexType>
 </element>

 <element name="developers">
  <complexType>
   <sequence>
    <element ref="mn:developer" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="developer">
  <complexType>
   <sequence>
    <element ref="mn:name"/>
    <element ref="mn:id"/>
    <element ref="mn:email"/>
    <element ref="mn:organization" minOccurs="0" maxOccurs="1"/>
   </sequence>
  </complexType>
 </element>

 <element name="dependencies">
  <complexType>
   <sequence>
    <element ref="mn:dependency" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="dependency">
  <complexType>
   <sequence>
    <element ref="mn:name"/>
    <element ref="mn:type"/>
    <element ref="mn:version"/>
    <element ref="mn:jar"/>
    <element ref="mn:homepage"/>
   </sequence>
  </complexType>
 </element>

 <element name="build">
  <complexType>
   <sequence>
    <element ref="mn:sourceDirectories"/>
    <element ref="mn:testSourceDirectories" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:aspectSourceDirectories" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:unitTestClassEntries" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:integrationUnitTestClassEntries" minOccurs="0"
maxOccurs="1"/>
    <element ref="mn:jarResources" minOccurs="0" maxOccurs="1"/>
    <element ref="mn:jars" required="optional"/>
   </sequence>
  </complexType>
 </element>

 <element name="sourceDirectories">
  <complexType>
   <sequence>
    <element ref="mn:sourceDirectory" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>


 <element name="testSourceDirectories">
  <complexType>
   <sequence>
    <element ref="mn:testSourceDirectory" minOccurs="0"
maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="aspectSourceDirectories">
  <complexType>
   <sequence>
    <element ref="mn:aspectSourceDirectory" minOccurs="0"
maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="unitTestClassEntries">
  <complexType>
   <sequence>
    <element ref="mn:unitTestClassEntry" minOccurs="0"
maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

 <element name="integrationUnitTestClassEntries">
  <complexType>
   <sequence>
    <element ref="mn:integrationUnitTestClassEntry" minOccurs="0"
maxOccurs="unbounded"/>
   <sequence>
  </complexType>
 </element>

 <element name="jarResources">
  <complexType>
   <sequence>
    <element ref="mn:jarResource" minOccurs="0" maxOccurs="unbounded"/>
   <sequence>
  </complexType>
 </element>

 <element name="jars">
  <complexType>
   <sequence>
    <element ref="mn:jar" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
  </complexType>
 </element>

</schema>

----- Original Message -----
From: "Daniel Rall" <dl...@finemaltcoding.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Thursday, March 28, 2002 10:09 AM
Subject: Re: [maven] project descriptor qns


> Jason van Zyl <jv...@zenplex.com> writes:
>
> > On Wed, 2002-03-27 at 21:57, Daniel Rall wrote:
> > > A DTD for the Maven project descriptor would answer a lot of these
> >> questions.  What do you think?
> >
> > Looks good. I'm using XML Authority to make a schema but this will
> > definitely answer peoples questions about the structure. I imagine this
> > might change here and there but I don't think it will change radically.
> > Pop it in the site!
>
> Okay.  Any particular place I should put it (I currently have it under
> maven/xdocs/)?  Also, I didn't do any validation on it -- can someone
> a suggest a tool for doing so (on Linux)?  Though I can write DTDs
> just fine (they just look like any other schema to me), I don't
> actually use them that often, and when I do there has generally been a
> pre-existing framework for doing so (yay Torque!).
>
> - Dan
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [maven] project descriptor qns

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jason van Zyl <jv...@zenplex.com> writes:

> On Wed, 2002-03-27 at 21:57, Daniel Rall wrote:
> > A DTD for the Maven project descriptor would answer a lot of these
>> questions.  What do you think?
>
> Looks good. I'm using XML Authority to make a schema but this will
> definitely answer peoples questions about the structure. I imagine this
> might change here and there but I don't think it will change radically.
> Pop it in the site!

Okay.  Any particular place I should put it (I currently have it under
maven/xdocs/)?  Also, I didn't do any validation on it -- can someone
a suggest a tool for doing so (on Linux)?  Though I can write DTDs
just fine (they just look like any other schema to me), I don't
actually use them that often, and when I do there has generally been a
pre-existing framework for doing so (yay Torque!).

- Dan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [maven] project descriptor qns

Posted by Jason van Zyl <jv...@zenplex.com>.
On Wed, 2002-03-27 at 21:57, Daniel Rall wrote:
> A DTD for the Maven project descriptor would answer a lot of these
> questions.  What do you think?

Looks good. I'm using XML Authority to make a schema but this will
definitely answer peoples questions about the structure. I imagine this
might change here and there but I don't think it will change radically.
Pop it in the site!
 
> <!--
>     Maven Project Descriptor Doctype Declaration
> -->
> 
> <!ELEMENT project
>   (name, id, currentVersion, organization?, inceptionYear, package,
>    shortDescription, gumpRepositoryId?, description?, url, cvsWebUrl?,
>    siteAddress?, siteDirectory?, distributionDirectory?, distributions,
>    branches, mailingLists, developers, dependencies, build)
> >
> 
> <!ELEMENT id>
> 
> <!ELEMENT currentVersion>
> 
> <!ELEMENT organization>
> 
> <!ELEMENT inceptionYear>
> 
> <!ELEMENT package>
> 
> <!ELEMENT shortDescription>
> 
> <!ELEMENT gumpRepositoryId>
> 
> <!ELEMENT description>
> 
> <!ELEMENT url>
> 
> <!ELEMENT cvsWebUrl>
> 
> <!ELEMENT siteAddress>
> 
> <!ELEMENT siteDirectory>
> 
> <!ELEMENT distributionDirectory>
> 
> <!ELEMENT distributions (distribution*)>
> 
> <!ELEMENT distribution (version,tag)>
> 
> <!ELEMENT version>
> 
> <!ELEMENT tag>
> 
> <!ELEMENT branches (branch*)>
> 
> <!ELEMENT branch (tag)>
> 
> <!ELEMENT mailingLists (mailingList*)>
> 
> <!ELEMENT mailingList (name,subscribe,unsubscribe,archive?)>
> 
> <!ELEMENT name>
> 
> <!ELEMENT subscribe>
> 
> <!ELEMENT unsubscribe>
> 
> <!ELEMENT archive>
> 
> <!ELEMENT developers (developer*)>
> 
> <!ELEMENT developer (name,id,email,organization?)>
> 
> <!ELEMENT email>
> 
> <!ELEMENT dependencies (dependency*)>
> 
> <!ELEMENT dependency (name,type,version,jar,homepage)>
> 
> <!--
> Indicates the type of dependency.
> 
> required      - The dependency is required.
> documentation - The dependency is documentation.
> -->
> <!ELEMENT type>
> 
> <!ELEMENT jar>
> 
> <!-- TODO: Replace with url element -->
> <!ELEMENT homepage>
> 
> <!ELEMENT build
>  (sourceDirectories, testSourceDirectories?, aspectSourceDirectories?,
>   unitTestClassEntries?, integrationUnitTestClassEntries?,
>   jarResources?, jars?)
> >
> 
> <!ELEMENT sourceDirectories (sourceDirectory*)>
> 
> <!ELEMENT sourceDirectory>
> 
> <!ELEMENT testSourceDirectories (testSourceDirectory*)>
> 
> <!ELEMENT testSourceDirectory>
> 
> <!ELEMENT aspecteSourceDirectories (aspecteSourceDirectory*)>
> 
> <!ELEMENT aspecteSourceDirectory>
> 
> <!ELEMENT unitTestClassEntries (unitTestClassEntry*)>
> 
> <!ELEMENT unitTestClassEntry>
> 
> <!ELEMENT integrationUnitTestClassEntries (integrationUnitTestClassEntry*)>
> 
> <!ELEMENT integrationUnitTestClassEntry>
> 
> <!ELEMENT jarResources (jarResource*)>
> 
> <!ELEMENT jarResource>
> 
> <!ELEMENT jars (jar*)>
> 
> <!ELEMENT jar>
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: RELAX NG schema for project.xml (Re: [maven] project descriptor qns)

Posted by Jason van Zyl <jv...@zenplex.com>.
On Thu, 2002-03-28 at 18:46, Jeff Turner wrote:
> On Thu, Mar 28, 2002 at 07:33:16AM -0500, Jason van Zyl wrote:
> > On Thu, 2002-03-28 at 07:15, Jeff Turner wrote:
> > > Attached is a RELAX NG schema that does the same.
> > > 
> > > Why? Just for the hell of it ;) And because RNG is very cool.. simple,
> > > powerful, readable.
> > > 
> > > http://www.oasis-open.org/committees/relax-ng/tutorial.html
> > > 
> > > There's also an Ant script to run it
> > 
> > There is also the multischema validation lib that does RELAX but I'm
> > still not sure of the license.
> 
> The jing license looks compatible. But couldn't the choice of validator
> be optional, like the doc build system?

I'm really not into complete freedom when it comes to things like
validating the XML project model because it's critical. I would like to
pick the best solution and stick with it.
 
> > I think an XML Schema is the way to go IMO but I have never looked at
> > relax-ng so I will take a peek now.
> 
> It's neat :) You can whack out a schema in an evening, without the tool
> support that XSchema almost necessitates. As befitting something
> designed by James Clark, rather than by a committee after 2 years'
> wrangling.
> 
> --Jeff
> 
> > -- 
> > jvz.
> > 
> > Jason van Zyl
> > jvanzyl@apache.org
> > 
> > http://tambora.zenplex.org
> > 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: RELAX NG schema for project.xml (Re: [maven] project descriptor qns)

Posted by Jeff Turner <je...@socialchange.net.au>.
On Thu, Mar 28, 2002 at 07:33:16AM -0500, Jason van Zyl wrote:
> On Thu, 2002-03-28 at 07:15, Jeff Turner wrote:
> > Attached is a RELAX NG schema that does the same.
> > 
> > Why? Just for the hell of it ;) And because RNG is very cool.. simple,
> > powerful, readable.
> > 
> > http://www.oasis-open.org/committees/relax-ng/tutorial.html
> > 
> > There's also an Ant script to run it
> 
> There is also the multischema validation lib that does RELAX but I'm
> still not sure of the license.

The jing license looks compatible. But couldn't the choice of validator
be optional, like the doc build system?

> I think an XML Schema is the way to go IMO but I have never looked at
> relax-ng so I will take a peek now.

It's neat :) You can whack out a schema in an evening, without the tool
support that XSchema almost necessitates. As befitting something
designed by James Clark, rather than by a committee after 2 years'
wrangling.

--Jeff

> -- 
> jvz.
> 
> Jason van Zyl
> jvanzyl@apache.org
> 
> http://tambora.zenplex.org
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: RELAX NG schema for project.xml (Re: [maven] project descriptor qns)

Posted by Jason van Zyl <jv...@zenplex.com>.
On Thu, 2002-03-28 at 07:15, Jeff Turner wrote:
> Attached is a RELAX NG schema that does the same.
> 
> Why? Just for the hell of it ;) And because RNG is very cool.. simple,
> powerful, readable.
> 
> http://www.oasis-open.org/committees/relax-ng/tutorial.html
> 
> There's also an Ant script to run it

There is also the multischema validation lib that does RELAX but I'm
still not sure of the license.I think an XML Schema is the way to go IMO
but I have never looked at relax-ng so I will take a peek now.

 
> 
> --Jeff
> 
> On Wed, Mar 27, 2002 at 06:57:12PM -0800, Daniel Rall wrote:
> > A DTD for the Maven project descriptor would answer a lot of these
> > questions.  What do you think?
> ----
> 

> #
> # RELAX NG schema for Maven's project descriptor (project.xml) format. Written
> # in RNG's non-XML syntax. To validate an XML, you'll need:
> #  Non-XML to XML syntax converter:
> #   http://www.thaiopensource.com/relaxng/nonxml/
> #  A RNG validator, like jing:
> #   http://www.thaiopensource.com/relaxng/jing.html
> #
> # Assuming the above, the commands to validate project.xml would be:
> #   export CLASSPATH=$CLASSPATH:rngnx.jar:jing.jar
> #   java com.thaiopensource.relaxng.nonxml.Driver project.rnx > project.rng
> #   java com.thaiopensource.relaxng.util.Driver project.rng project.xml
> #
> # Jeff Turner <je...@apache.org>
> #
> 
> datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
> 
> start =				project
> project =			element project {
> 						element name {text},
> 						element id {text},
> 						element currentVersion {text},
> 						element organization {text}?,
> 						element inceptionYear {
> 							xsd:gYear { pattern="[0-9]{4}" }
> 						},
> 						element package {
> 							xsd:string { pattern="[\S\.]+" }
> 						},
> 						element shortDescription {text},
> 						element gumpRepositoryId {text}?,
> 						element description {text}?,
> 						element url {xsd:anyURI},
> 						element cvsWebUrl {xsd:anyURI}?,
> 						element issueTrackingUrl {xsd:anyURI},
> 						element siteAddress {text}?,
> 						element siteDirectory {text}?,
> 						element distributionDirectory {text}?,
> 						distributions?,
> 						branches?,
> 						mailingLists,
> 						developers,
> 						dependencies,
> 						build
> 					}
> distributions =		element distributions {
> 						element distribution {
> 							element version {text},
> 							element tag {text}
> 						}*
> 					}
> 
> branches =			element branches {
> 						element branch {
> 							element tag {text}
> 						}*
> 					}
> mailingLists =		element mailingLists {
> 						element mailingList {
> 							element name {text},
> 							element subscribe {text},
> 							element unsubscribe {text},
> 							element archive {text}
> 						}*
> 					}
> developers =		element developers {
> 						element developer {
> 							element name {text},
> 							element id {text},
> 							element email {text},
> 							element organization {text}?
> 						}*
> 					}
> dependencies =		element dependencies {
> 						element dependency {
> 							element name {text},
> 							element type {"required"|"documentation"},
> 							element version {text},
> 							element jar {text},
> 							element url {xsd:anyURI}?
> 
> 						}*
> 					}
> build =				element build {
> 						sourceDirectories,
> 						testSourceDirectories?,
> 						aspectSourceDirectories?,
> 						unitTestClassEntries?,
> 						runtimeTestClassEntries?,
> 						integrationUnitTestClassEntries?,
> 						jarResources?,
> 						jars?
> 					}
> 
> sourceDirectories =			element sourceDirectories {
> 								element sourceDirectory {text}*
> 							}
> testSourceDirectories =		element testSourceDirectories {
> 								element testSourceDirectory {text}*
> 							}
> aspectSourceDirectories =	element aspectSourceDirectories {
> 								element aspectSourceDirectory {text}*
> 							}
> unitTestClassEntries =		element unitTestClassEntries {
> 								element unitTestClassEntry {text}*
> 							}
> runtimeTestClassEntries = 	element runtimeTestClassEntries {
> 								element runtimeTestClassEntry {text}*
> 							}
> integrationUnitTestClassEntries = element integrationUnitTestClassEntries {
> 									element integrationUnitTestClassEntry {text}*
> 								}
> jarResources =		element jarResources {
> 						element jarResource {text}*
> 					}
> jars =				element jars {
> 						element jar {text}*
> 					}
> ----
> 

> <?xml version="1.0"?>
> 
> <project name="validate" default="validate" basedir=".">
>     <property name="rnx" value="project.rnx"/>
>     <property name="rng" value="project.rng"/>
>     <property file="${user.home}/build.properties"/>
>     <property name="parser.jar" value="${lib.repo}/xerces.jar"/>
>     <property name="jing.jar" value="${lib.repo}/jing.jar"/>
>     <property name="rngnx.jar" value="${lib.repo}/rngnx.jar"/>
> 
>     <target name="rnx2rng">
>         <java 
>             classname="com.thaiopensource.relaxng.nonxml.Driver" 
>             fork="yes" 
>             failonerror="yes"
>             output="${rng}">
>             <arg line="${rnx}"/>
>             <classpath>
>                 <pathelement location="${rngnx.jar}"/>
>                 <pathelement location="${parser.jar}"/>
>             </classpath>
>         </java>
>     </target>
> 
>     <target name="validate" depends="rnx2rng">
> 
>         <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
>             <classpath>
>                 <pathelement location="${jing.jar}"/>
>                 <pathelement location="${parser.jar}"/>
>             </classpath>
>         </taskdef>
>         <jing rngfile="${rng}">
>             <fileset dir="." includes="project.xml"/>
>         </jing>
>     </target>
> </project>
> 
> ----
> 

> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RELAX NG schema for project.xml (Re: [maven] project descriptor qns)

Posted by Jeff Turner <je...@socialchange.net.au>.
Attached is a RELAX NG schema that does the same.

Why? Just for the hell of it ;) And because RNG is very cool.. simple,
powerful, readable.

http://www.oasis-open.org/committees/relax-ng/tutorial.html

There's also an Ant script to run it


--Jeff

On Wed, Mar 27, 2002 at 06:57:12PM -0800, Daniel Rall wrote:
> A DTD for the Maven project descriptor would answer a lot of these
> questions.  What do you think?

Re: [maven] project descriptor qns

Posted by Daniel Rall <dl...@finemaltcoding.com>.
A DTD for the Maven project descriptor would answer a lot of these
questions.  What do you think?

<!--
    Maven Project Descriptor Doctype Declaration
-->

<!ELEMENT project
  (name, id, currentVersion, organization?, inceptionYear, package,
   shortDescription, gumpRepositoryId?, description?, url, cvsWebUrl?,
   siteAddress?, siteDirectory?, distributionDirectory?, distributions,
   branches, mailingLists, developers, dependencies, build)
>

<!ELEMENT id>

<!ELEMENT currentVersion>

<!ELEMENT organization>

<!ELEMENT inceptionYear>

<!ELEMENT package>

<!ELEMENT shortDescription>

<!ELEMENT gumpRepositoryId>

<!ELEMENT description>

<!ELEMENT url>

<!ELEMENT cvsWebUrl>

<!ELEMENT siteAddress>

<!ELEMENT siteDirectory>

<!ELEMENT distributionDirectory>

<!ELEMENT distributions (distribution*)>

<!ELEMENT distribution (version,tag)>

<!ELEMENT version>

<!ELEMENT tag>

<!ELEMENT branches (branch*)>

<!ELEMENT branch (tag)>

<!ELEMENT mailingLists (mailingList*)>

<!ELEMENT mailingList (name,subscribe,unsubscribe,archive?)>

<!ELEMENT name>

<!ELEMENT subscribe>

<!ELEMENT unsubscribe>

<!ELEMENT archive>

<!ELEMENT developers (developer*)>

<!ELEMENT developer (name,id,email,organization?)>

<!ELEMENT email>

<!ELEMENT dependencies (dependency*)>

<!ELEMENT dependency (name,type,version,jar,homepage)>

<!--
Indicates the type of dependency.

required      - The dependency is required.
documentation - The dependency is documentation.
-->
<!ELEMENT type>

<!ELEMENT jar>

<!-- TODO: Replace with url element -->
<!ELEMENT homepage>

<!ELEMENT build
 (sourceDirectories, testSourceDirectories?, aspectSourceDirectories?,
  unitTestClassEntries?, integrationUnitTestClassEntries?,
  jarResources?, jars?)
>

<!ELEMENT sourceDirectories (sourceDirectory*)>

<!ELEMENT sourceDirectory>

<!ELEMENT testSourceDirectories (testSourceDirectory*)>

<!ELEMENT testSourceDirectory>

<!ELEMENT aspecteSourceDirectories (aspecteSourceDirectory*)>

<!ELEMENT aspecteSourceDirectory>

<!ELEMENT unitTestClassEntries (unitTestClassEntry*)>

<!ELEMENT unitTestClassEntry>

<!ELEMENT integrationUnitTestClassEntries (integrationUnitTestClassEntry*)>

<!ELEMENT integrationUnitTestClassEntry>

<!ELEMENT jarResources (jarResource*)>

<!ELEMENT jarResource>

<!ELEMENT jars (jar*)>

<!ELEMENT jar>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>