wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Last Modified Time stamp from Ant script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Last Modified Time stamp from Ant script" Watch "Last Modified Time stamp from Ant script" New topic
Author

Last Modified Time stamp from Ant script

Bhaarat Sharma
Ranch Hand

Joined: Jun 04, 2007
Posts: 96
Hi,

Can someone please tell me if there is a way in Ant Script to compile files only which have a 'last modified' time stamp between 2 minutes of current time?

Actually the reason is that I am coming from Websphere and Netbeans background where build scripts are automatically made for you. But now I have to run a Build script made by someone to compile my project. Even if a single System.out.println statement is changed in one file..the build script compiles all 150 source files which takes a long time.

I am wondering if it can, like websphere and netbeans, only compile the the the files which I have made changes in.

I'd appreciate any tips.

Thanks


omnipresent
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Originally posted by bhaarat sharma:


I am wondering if it can, like websphere and netbeans, only compile the the the files which I have made changes in.

I'd appreciate any tips.

Thanks


Take a look at the javac task documentation from ant manual. It is the default behavior to only compile the changed files if you specify the source directory like ant expects.

The source and destination directory will be recursively scanned for Java source files to compile. Only Java files that have no corresponding .class file or where the class file is older than the .java file will be compiled.


If you don't get it working from reading the manual on javac, then post the relevant part of your build file.
Bhaarat Sharma
Ranch Hand

Joined: Jun 04, 2007
Posts: 96
Thanks I'll post relevant code from build script.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Last Modified Time stamp from Ant script
 
Similar Threads
ant with smartCVS
Hi
how to reduce the deploy time of ejbdeploy command
Deploying servlets as a war file
_pageflow in weblogic 9.2 ??