Checking timestamp of all jar files is not a good idea. You upgraded to
a newer version of log4j.jar for example, but there's no need for a
regeneration, or simply you added a new jar file.

Here is one of my favorite tricks, by Rickard actually:

String path_str =
this.getClass().getProtectionDomain().getCodeSource().getLocation().getF
ile().toString();

if( path_str != null && path_str.startsWith( "/" ) )
{
        //it always begins with a / in front of it!!!
        path_str = path_str.substring( 1 );
}

So now path_str has the full path to xdoclet.jar :-)
Do a new File() around it and lastModified().

Ara.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-devel-
> [EMAIL PROTECTED]] On Behalf Of Vincent Harcq
> Sent: Friday, December 28, 2001 10:21 PM
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-devel] CVS update: 'xdoclet/core/src/xdoclet
> DocletContext.java DocletTask.java TemplateSubTask.java'
> 
> Update of /cvsroot/xdoclet/xdoclet/core/src/xdoclet
> In directory usw-pr-cvs1:/tmp/cvs-serv17288/xdoclet
> 
> Modified Files:
>       DocletContext.java DocletTask.java TemplateSubTask.java
> Log Message:
> Add timestamp checking on JAR files that are part of the classpath of
the
> doclet.  In other words if xdoclet is changed, xdoclet.jar is changed
and
> a force generation is done automatically, no need for versionning,
> date/time in xodclet-generated, ...
> 
> _______________________________________________
> Xdoclet-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-devel


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Reply via email to