db-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: db-site maven.xml
Date Tue, 04 Feb 2003 07:42:40 GMT
jvanzyl     2003/02/03 23:42:40

  Modified:    .        maven.xml
  Log:
  o New templates can now be added easily.
  
  Revision  Changes    Path
  1.5       +31 -24    db-site/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/db-site/maven.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- maven.xml	4 Feb 2003 07:26:24 -0000	1.4
  +++ maven.xml	4 Feb 2003 07:42:40 -0000	1.5
  @@ -1,5 +1,6 @@
   <project
     default="site"
  +  xmlns:j="jelly:core"
     xmlns:maven="jelly:maven"
     xmlns:velocity="jelly:org.apache.commons.jelly.tags.velocity.VelocityTagLibrary">
   
  @@ -15,6 +16,12 @@
     
     <goal name="db-site">
     
  +    <!--
  +     |
  +     | Walk over all the DB subprojects and collect its information.
  +     |
  +     -->
  +  
       <maven:reactor
         basedir="${basedir}/../"
         includes="*/project.xml"
  @@ -25,34 +32,34 @@
       
       <!--
        |
  -     | Generate the documentation for the front-end site. First we will
  -     | generate the navigation based on the projects that we just
  -     | processed, then we will generate the front-end site itself.
  +     | Now we take each of our template in the ${basedir}/templates
  +     | directory and process them against the information collected
  +     | by the reactor.
  +     |
  +     | For each template name Y.xml a corresponding Y.html will be
  +     | generated in the top-level directory of the site. So for example
  +     | if we have a template named 'mail.xml', a page named 'mail.html'
  +     | will be generated in the top-level directory.
        | 
        -->
   
  -    <!-- We can probably loop this ... -->
  -
  -    <velocity:merge 
  -      name="${basedir}/xdocs/navigation.xml"
  -      basedir="${basedir}/templates"
  -      template="navigation.xml"/>
  -
  -    <velocity:merge 
  -      name="${basedir}/xdocs/mail.xml"
  -      basedir="${basedir}/templates"
  -      template="mail.xml"/>
  -
  -    <velocity:merge 
  -      name="${basedir}/xdocs/whoweare.xml"
  -      basedir="${basedir}/templates"
  -      template="whoweare.xml"/>
  -
  -    <velocity:merge 
  -      name="${basedir}/xdocs/source-repos.xml"
  -      basedir="${basedir}/templates"
  -      template="source-repos.xml"/>
  +    <fileScanner var="templates">
  +      <fileset dir="${basedir}/templates">
  +        <include name="*.xml"/>
  +      </fileset>
  +    </fileScanner>
  +
  +    <j:forEach var="template" items="${templates.iterator()}">
  +      
  +      <j:set var="templateName" value="${template.name}"/>
  +      <echo>Processing ${templateName} template ...</echo> 
  +    
  +      <velocity:merge 
  +        name="${basedir}/xdocs/${templateName}"
  +        basedir="${basedir}/templates"
  +        template="${templateName}"/>
   
  +    </j:forEach>
     </goal>
   
   </project>
  
  
  

Mime
View raw message