User: pazu    
  Date: 02/05/17 09:34:49

  Modified:    modules  Tag: MODULE_REFACTORING_BRANCH modules-common.xml
  Log:
  Build the modules only if really necessary. An <uptodate> task checks the
  timestamp of all module files against the module jar. If the jar is updotate,
  all further tasks are skipped.
  
  Note that this undoes the previous commit by Konstantin Pribluda, but achieves
  the same effect. Sorry, Konstantin.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.13  +15 -18    xdoclet/modules/Attic/modules-common.xml
  
  Index: modules-common.xml
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/modules/Attic/modules-common.xml,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -w -r1.1.2.12 -r1.1.2.13
  --- modules-common.xml        17 May 2002 15:50:15 -0000      1.1.2.12
  +++ modules-common.xml        17 May 2002 16:34:48 -0000      1.1.2.13
  @@ -31,32 +31,28 @@
                   <!-- include previously built jars -->
                   <include name="*.jar"/>
               </fileset>
  +
           </path>
           <!-- Define the xdoclet task -->
           <taskdef name="xdoclet" classname="xdoclet.DocletTask"
               classpathref="module.class.path"
           />
   
  -       <condition property="file.url.prefix" value="file://">
  -         <os family="unix" />
  -       </condition>
  -       <condition property="file.url.prefix" value="file:/">
  -         <os family="windows" />
  -       </condition>
  +             <!-- Checks for xtags.xml -->
  +             <available file="${module.src.dir}/META-INF/xtags.xml" 
property="module.xtags.exists"/>
   
  -       <uptodate property="skip.xdoclet-xml" 
targetfile="${xdoclet-xml.dir}/xdoclet.xml">
  -            <srcfiles dir="${module.src.dir}">
  -                <include name="**/*Handler.java" />
  -                <include name="**/*SubTask.java" />
  -            </srcfiles>
  +             <!-- Checks if the module is uptodate -->
  +             <uptodate property="module.uptodate" targetfile="${module.jar.file}">
  +                     <srcfiles dir="${module.dir}"/>
          </uptodate>
       </target>
   
       <!-- =================================================================== -->
       <!-- Generates an xdoclet.xml deployment descriptor for xdoclet modules  -->
       <!-- =================================================================== -->
  -    <target name="xdoclet-xml" unless="skip.xdoclet-xml"
  +    <target name="xdoclet-xml"
           description="Generates an xdoclet.xml deployment descriptor for xdoclet 
modules"
  +             unless="module.uptodate"
       >
           <echo message="xdoclet.xml: ${xdoclet-xml.dir}"/>
           <mkdir dir="${xdoclet-xml.dir}"/>
  @@ -77,7 +73,7 @@
       <!-- =================================================================== -->
       <!-- Compiles the source code                                            -->
       <!-- =================================================================== -->
  -    <target name="compile" depends="beautify">
  +    <target name="compile" depends="beautify" unless="module.uptodate">
           <mkdir dir="${module.classes.dir}"/>
           <javac
               destdir="${module.classes.dir}"
  @@ -93,7 +89,7 @@
       <!-- =================================================================== -->
       <!-- Creates the module jar                                              -->
       <!-- =================================================================== -->
  -    <target name="jar" depends="init,xdoclet-xml,compile,docs,copy-src">
  +    <target name="jar" depends="init,xdoclet-xml,compile,docs,copy-src" 
unless="module.uptodate">
           <jar jarfile="${module.jar.file}">
               <fileset dir="${module.classes.dir}">
                   <include name="**/*.class"/>
  @@ -101,6 +97,7 @@
               </fileset>
               <fileset dir="${module.src.dir}">
                   <include name="**/*.xdt"/>
  +                             <include name="**/*.properties"/>
               </fileset>
           </jar>
       </target>
  @@ -108,7 +105,7 @@
       <!-- =================================================================== -->
       <!-- Beautify the code                                                   -->
       <!-- =================================================================== -->
  -    <target name="beautify" depends="init">
  +    <target name="beautify" depends="init" unless="module.uptodate">
   
           <taskdef name="pretty" classname="org.acm.seguin.ant.Pretty"
                    classpath="${lib.dir}/prettyprinter.jar"/>
  @@ -124,7 +121,7 @@
       <!-- =================================================================== -->
       <!-- Generate tag docs                                                   -->
       <!-- =================================================================== -->
  -    <target name="docs" description="Generate tag docs">
  +    <target name="docs" description="Generate tag docs" if="module.xtags.exists" 
unless="module.uptodate">
           <xmlcatalog id="xtags">
               <dtd
                  publicId="-//XDoclet Team//DTD XDoclet Tags 1.1//EN"
  @@ -150,7 +147,7 @@
      <!-- Copies the source code. Required for building one xdoclet.xml       -->
      <!-- as well as the module toc.xml                                       -->
      <!-- =================================================================== -->
  -   <target name="copy-src" depends="init">
  +   <target name="copy-src" depends="init" unless="module.uptodate">
         <mkdir dir="${modules.all-src.dir}"/>
         <copy todir="${modules.all-src.dir}">
            <fileset dir="${module.src.dir}">
  
  
  

_______________________________________________________________

Hundreds of nodes, one monster rendering program.
Now that�s a super model! Visit http://clustering.foundries.sf.net/
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to