User: vharcq
Date: 02/05/21 14:11:14
Modified: core/src/xdoclet/loader Tag: MODULE_REFACTORING_BRANCH
ModuleFinder.java
Log:
Bring back timestamp checking ON ALL JARS IN CLASSPATH to make the build quicker
Revision Changes Path
No revision
No revision
1.3.2.10 +25 -1 xdoclet/core/src/xdoclet/loader/ModuleFinder.java
Index: ModuleFinder.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/loader/ModuleFinder.java,v
retrieving revision 1.3.2.9
retrieving revision 1.3.2.10
diff -u -w -r1.3.2.9 -r1.3.2.10
--- ModuleFinder.java 13 May 2002 22:24:16 -0000 1.3.2.9
+++ ModuleFinder.java 21 May 2002 21:11:14 -0000 1.3.2.10
@@ -23,7 +23,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created 7. april 2002
- * @version $Revision: 1.3.2.9 $
+ * @version $Revision: 1.3.2.10 $
*/
public class ModuleFinder
{
@@ -54,6 +54,30 @@
}
}
throw new IllegalStateException("Couldn't find " + name + " on classpath:"
+ System.getProperty("xdoclet.class.path"));
+ }
+
+ /**
+ * Find the newest Jar file in classpath. This method is used to see if a
generation is needed because one of the
+ * xdoclet Jars has changed since the last generation.
+ *
+ * @return The newest JAR file in the Classpath
+ */
+ public static File getNewestJarFileOnClassPath()
+ {
+ List jars = findJarFiles();
+ Iterator i = jars.iterator();
+ long newest = Long.MIN_VALUE;
+ File newestFile = null;
+
+ while (i.hasNext()) {
+ File jar = (File) i.next();
+
+ if (jar.lastModified() >= newest) {
+ newestFile = jar;
+ newest = jar.lastModified();
+ }
+ }
+ return newestFile;
}
public static List findModules(boolean verbose)
_______________________________________________________________
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