geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/modules/twiddle/src/schema twiddle-configuration.xsd
Date Tue, 12 Aug 2003 18:18:45 GMT
jdillon     2003/08/12 11:18:45

  Added:       modules/twiddle maven.xml project.properties project.xml
               modules/twiddle/src/etc twiddle-configuration-binding.xml
               modules/twiddle/src/schema twiddle-configuration.xsd
  Log:
   o Twiddle project files, configuration schema & castor binding
  
  Revision  Changes    Path
  1.1                  incubator-geronimo/modules/twiddle/maven.xml
  
  Index: maven.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Id: maven.xml,v 1.1 2003/08/12 18:18:45 jdillon Exp $ -->
  
  <project
    xmlns:j="jelly:core"
    xmlns:u="jelly:util"
    xmlns:ant="jelly:ant"
    xmlns:castor="castor">
    
    <!-- ===================== -->
    <!-- Module Initialization -->
    <!-- ===================== -->
    
    <ant:property file="${basedir}/../../etc/project.properties"/>
    
    
    <!-- ================================= -->
    <!-- Compile XML->Java Binding Sources -->
    <!-- ================================= -->
    
    <preGoal name="java:compile">
      <attainGoal name="castor:prepare-filesystem"/>
        
      <!-- this does not currently support -binding-file 
      <castor:generate schema="${basedir}/src/schema/twiddle-configuration.xsd"
                       package="org.apache.geronimo.twiddle.config"
                       marshal="false"
                       types="j2"/>
      -->
      
      <!-- The following is a hacked snippet of the castor plugin -->
      
      <j:set var="schema" value="${basedir}/src/schema/twiddle-configuration.xsd"/>
      <j:set var="fileVar" value="${schema}.filename"/>
      <j:set var="uptodateVar" value="${schema}.uptodate"/>
      <ant:basename property="${fileVar}" file="${schema}"/>
      <j:set var="filename" value="${pom.getContext().getVariable(fileVar)}"/>
      <j:set var="context" value="${pom.getPluginContext('maven-castor-plugin')}"/>
      <j:set var="log" value="${pom.getPluginContext('maven-castor-plugin').getVariable('maven.castor.tstamp')}"/>
      <j:set var="gen" value="${pom.getPluginContext('maven-castor-plugin').getVariable('maven.castor.dest')}"/>
      
      <ant:uptodate property="${uptodateVar}" targetfile="${log}/${filename}">
        <ant:srcfiles dir="${basedir}" includes="${schema}"/>
      </ant:uptodate>
      
      <j:set var="uptodate" value="${pom.getContext().getVariable(uptodateVar)}"/>
      
      <j:if test="${uptodate == null}">
      
      <ant:java className="org.exolab.castor.builder.SourceGenerator"
                failonerror="true">
        <ant:arg value="-i"/>
        <ant:arg value="${schema}"/>
        <ant:arg value="-binding-file"/>
        <ant:arg value="${basedir}/src/etc/twiddle-configuration-binding.xml"/>
        <ant:arg value="-package"/>
        <ant:arg value="org.apache.geronimo.twiddle.config"/>
        <ant:arg value="-types"/>
        <ant:arg value="j2"/>
        <ant:arg value="-nomarshall"/>
        <ant:arg value="-f"/>
        <ant:arg value="-dest"/>
        <ant:arg value="${gen}"/>
      </ant:java>
      
      <ant:touch file="${log}/${filename}"/>
      
      </j:if>
      
    </preGoal>
  
  </project>
  
  
  1.1                  incubator-geronimo/modules/twiddle/project.properties
  
  Index: project.properties
  ===================================================================
  ##
  ## $Id: project.properties,v 1.1 2003/08/12 18:18:45 jdillon Exp $
  ##
  
  
  
  
  1.1                  incubator-geronimo/modules/twiddle/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Id: project.xml,v 1.1 2003/08/12 18:18:45 jdillon Exp $ -->
  
  <project>
    <pomVersion>3</pomVersion>
    <extend>${basedir}/../../etc/project.xml</extend>
    
    <!-- ===================== -->
    <!-- Module Identification -->
    <!-- ===================== -->
    
    <name>Geronimo :: Twiddle</name>
    <id>geronimo-twiddle</id>
    <shortDescription></shortDescription>
    <description></description>
    <siteDirectory></siteDirectory>
    <distributionDirectory></distributionDirectory>
    
    <package>org.apache.geronimo.twiddle</package>
    <currentVersion>DEV</currentVersion>
    
    
    <!-- ============ -->
    <!-- Dependencies -->
    <!-- ============ -->
    
    <dependencies>
    
      <!-- Module Dependencies -->
      
      <dependency>
        <groupId>geronimo</groupId>
        <artifactId>geronimo-common</artifactId>
        <version>DEV</version>         
      </dependency>
      
      <!-- Thirdparty Dependencies -->
      
      <dependency>
        <id>junit</id>
        <version>3.8.1</version>
        <url>http://junit.org</url>
      </dependency>
      
      <dependency>
        <id>castor</id>
        <version>0.9.5</version>
        <url>http://castor.exolab.org</url>
      </dependency>
      
      <dependency>
        <id>xerces</id>
        <version>2.4.0</version>
        <url>http://xml.apache.org</url>
      </dependency>
      
      <dependency>
        <id>xml-apis</id>
        <version>1.0.b2</version>
      </dependency>
      
      <dependency>
        <id>log4j</id>
        <version>1.2.8</version>
        <url>http://jakarta.apache.org/log4j</url>
      </dependency>
      
      <dependency>
        <id>commons-logging</id>
        <version>1.0.3</version>
        <url>http://jakarta.apache.org/commons/logging.html</url>
      </dependency>
      
      <dependency>
        <id>commons-jexl</id>
        <version>SNAPSHOT</version>
        <url>http://jakarta.apache.org/commons/jexl.html</url>
      </dependency>
      
      <dependency>
        <id>commons-cli</id>
        <version>1.0</version>
        <url>http://jakarta.apache.org/commons/cli</url>
      </dependency>
      
    </dependencies>
    
    
    <!-- =================== -->
    <!-- Build Specification -->
    <!-- =================== -->
    
    <build>
      <unitTest>
        <!-- For some reason this is not pulled from the global project -->
        <includes>
          <include>**/*Test.java</include>
        </includes>
        <excludes>
          <exclude>**/Abstract*.java</exclude>
        </excludes>
        
        <resources>
          <resource>
            <directory>${basedir}/src/test</directory>
            <includes>
              <include>**/*.xml</include>
            </includes>
          </resource>
        </resources>
      </unitTest>
    </build>
  
  </project>
  
  
  
  1.1                  incubator-geronimo/modules/twiddle/src/etc/twiddle-configuration-binding.xml
  
  Index: twiddle-configuration-binding.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Id: twiddle-configuration-binding.xml,v 1.1 2003/08/12 18:18:45 jdillon Exp $ -->
  
  <binding xmlns="http://www.castor.org/SourceGenerator/Binding"
           defaultBindingType="element">
  
    <!-- Define the {namespace,package} binding -->
    
    <package>
      <name>org.apache.geronimo.twiddle.config</name>
      <namespace>http://geronimo.apache.org/xml/schema/Twiddle/Configuration</namespace>
    </package>
    
    <!-- Use custom class naming -->
    
    <!--
    <namingXML>
      <elementName>
        <suffix>Config</suffix>
      </elementName>
      
      <complexTypeName>
        <suffix>Type</suffix>
      </complexTypeName>
      
      <modelGroupName>
        <suffix>Group</suffix>
      </modelGroupName>
    </namingXML>
    -->
    
    <!-- Custom element binding -->
    
    <elementBinding name="environment">
      <java-class name="EnvironmentConfig"/>
    </elementBinding>
    
    <elementBinding name="command">
      <java-class name="CommandConfig"/>
    </elementBinding>
    
    <elementBinding name="command-set">
      <java-class name="CommandSetConfig"/>
    </elementBinding>
    
  </binding>
  
  
  1.1                  incubator-geronimo/modules/twiddle/src/schema/twiddle-configuration.xsd
  
  Index: twiddle-configuration.xsd
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Id: twiddle-configuration.xsd,v 1.1 2003/08/12 18:18:45 jdillon Exp $ -->
  
  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns="http://geronimo.apache.org/xml/schema/Twiddle/Configuration"
              targetNamespace="http://geronimo.apache.org/xml/schema/Twiddle/Configuration"
              elementFormDefault="qualified">
  
    <xsd:annotation>
      <xsd:documentation>
        This is the XML Schema for Apache Geronimo Twiddle Configuration.
      </xsd:documentation>
    </xsd:annotation>
    
    <xsd:element name="configuration">
      <xsd:annotation>
        <xsd:documentation>
          The root configuration element.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element ref="properties" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="libraries" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="includes" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="environment" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="search-path" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="commands" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="libraries">
      <xsd:annotation>
        <xsd:documentation>
          Definitions of additional libraries to load.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="library" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="properties">
      <xsd:annotation>
        <xsd:documentation>
          Definitions of system properties.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="property">
      <xsd:annotation>
        <xsd:documentation>
          A single system property definition.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:simpleContent>
          <xsd:extension base="xsd:string">
           <xsd:attribute name="name" use="required" type="xsd:string"/>
          </xsd:extension>
        </xsd:simpleContent>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="includes">
      <xsd:annotation>
        <xsd:documentation>
          External configuration file include definitions.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="include" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="search-path">
      <xsd:annotation>
        <xsd:documentation>
          Definitions of the command/command-set search path.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="path-element" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="environment">
      <xsd:annotation>
        <xsd:documentation>
          Definition of global/command/command-set environment.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="complex-attribute" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="attribute">
      <xsd:annotation>
        <xsd:documentation>
          Definition of a single simple environment attribute.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:simpleContent>
          <xsd:extension base="xsd:string">
            <xsd:attribute name="name" use="required" type="xsd:string"/>
            <xsd:attribute name="type">
              <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                  <xsd:enumeration value="string"/>
                  <xsd:enumeration value="boolean"/>
                  <xsd:enumeration value="number"/>
                  <xsd:enumeration value="class"/>
                </xsd:restriction>
              </xsd:simpleType>
            </xsd:attribute>
          </xsd:extension>
        </xsd:simpleContent>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="complex-attribute">
      <xsd:annotation>
        <xsd:documentation>
          Definition of a single complex environment attribute.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        
        <xsd:attribute name="name" use="required" type="xsd:string"/>
        <xsd:attribute name="class" use="required" type="xsd:string"/>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="commands">
      <xsd:annotation>
        <xsd:documentation>
          The definition of commands.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element ref="command" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="command-set" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="description" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>
          The definition of a generic text description.
        </xsd:documentation>
      </xsd:annotation>
    </xsd:element>
    
    <xsd:element name="command-set">
      <xsd:annotation>
        <xsd:documentation>
          The definition of a single command-set.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="command" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="command-set" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        
        <xsd:attribute name="name" use="required" type="xsd:string"/>
      </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="command">
      <xsd:annotation>
        <xsd:documentation>
          The definition of a single command.
        </xsd:documentation>
      </xsd:annotation>
      
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
          <xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        
        <xsd:attribute name="name" use="required" type="xsd:string"/>
        <xsd:attribute name="class" use="required" type="xsd:string"/>
      </xsd:complexType>
    </xsd:element>
    
  </xsd:schema>
  
  

Mime
View raw message