User: vharcq  
  Date: 02/05/21 14:11:14

  Modified:    core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
                        GenerationManager.java
  Log:
  Bring back timestamp checking ON ALL JARS IN CLASSPATH to make the build quicker
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.11.2.8  +7 -31     xdoclet/core/src/xdoclet/GenerationManager.java
  
  Index: GenerationManager.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/GenerationManager.java,v
  retrieving revision 1.11.2.7
  retrieving revision 1.11.2.8
  diff -u -w -r1.11.2.7 -r1.11.2.8
  --- GenerationManager.java    13 May 2002 09:06:01 -0000      1.11.2.7
  +++ GenerationManager.java    21 May 2002 21:11:14 -0000      1.11.2.8
  @@ -24,13 +24,11 @@
    *
    * @author    Vincent Harcq ([EMAIL PROTECTED])
    * @created   March 30, 2002
  - * @version   $Revision: 1.11.2.7 $
  + * @version   $Revision: 1.11.2.8 $
    */
   public class GenerationManager implements java.io.Serializable
   {
  -    private final static File xdocletJar = ModuleFinder.getJar("xdoclet.jar");
  -
  -    private final static File xjavadocJar = ModuleFinder.getJar("xjavadoc.jar");
  +    private final static File newestJar = 
ModuleFinder.getNewestJarFileOnClassPath();
   
       private static transient Map parserDb = null;
   
  @@ -167,21 +165,9 @@
               return true;
           }
   
  -        // 1. Check the classpath for timestamp on XDOCLET JAR
  -        if (file.lastModified() < xdocletJar.lastModified()) {
  -            log.debug("Generation needed for '" + file.getName() + "' because of 
timestamp of " + xdocletJar.getName());
  -            return true;
  -        }
  -
  -        log.debug("Reject file '" + file.getName() + "' because of timestamp of " + 
xdocletJar.getName());
  -
  -        if (file.lastModified() < xjavadocJar.lastModified()) {
  -            log.debug("Generation needed for '" + file.getName() + "' because of 
timestamp of " + xjavadocJar.getName());
  +        // 1. Check on Jar timestamp
  +        if (checkJars(file) == true)
               return true;
  -        }
  -
  -        log.debug("Reject file '" + file.getName() + "' because of timestamp of " + 
xdocletJar.getName());
  -        log.debug("Generation need check for " + file.getName());
   
           // 2. Check the timestamp of template file and merge files
           if (isGenerationNeeded(file, subTask.getTemplateURL())) {
  @@ -276,25 +262,15 @@
       {
           Log log = LogUtil.getLog(GenerationManager.class, "generation");
   
  -        if (file.lastModified() < xdocletJar.lastModified()) {
  +        if (file.lastModified() < newestJar.lastModified()) {
               if (log.isDebugEnabled()) {
  -                log.debug("Generation needed for '" + file.getName() + "' because 
of timestamp of " + xdocletJar.getName());
  +                log.debug("Generation needed for '" + file.getName() + "' because 
of timestamp of " + newestJar.getName());
               }
               return true;
           }
   
           if (log.isDebugEnabled()) {
  -            log.debug("Reject file '" + file.getName() + "' because of timestamp of 
" + xdocletJar.getName());
  -        }
  -
  -        if (file.lastModified() < xjavadocJar.lastModified()) {
  -            if (log.isDebugEnabled()) {
  -                log.debug("Generation needed for '" + file.getName() + "' because 
of timestamp of " + xjavadocJar.getName());
  -            }
  -            return true;
  -        }
  -        if (log.isDebugEnabled()) {
  -            log.debug("Reject file '" + file.getName() + "' because of timestamp of 
" + xjavadocJar.getName());
  +            log.debug("Reject file '" + file.getName() + "' because of timestamp of 
" + newestJar.getName());
           }
   
           return false;
  
  
  

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to