File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes running of modified sql files from source folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "running of modified sql files from source folder" Watch "running of modified sql files from source folder" New topic
Author

running of modified sql files from source folder

Deepak Devarapally
Greenhorn

Joined: Jun 12, 2012
Posts: 3
Hi

I have few sql files. I do run all the sql files daily using ant script.

Instead of running all the scripts daily, I want to run only the modified files (that i pulled from svn) using ant script.

f there are 100 files and 10 file are updated then I need to run only those 10 files.

How can we implement this using ant script.

Thanks
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

Looks to me like you would have to call the svn command line or API to determine
which have changed. "Checkout" or update these into a temp folder then iterate
through and execute.

WP
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

Another option - configure Subversion to retain the file checkin time (by default it sets the last modified time to the checkout time). Then for the <sql> task use a file selector that has a date restriction and select only files with today's date (or something like that).


JBoss In Action
 
 
subject: running of modified sql files from source folder
 
Similar Threads
Perl with CGI?
running the script
Deploying servlets as a war file
sqlplus
Configuration management of JBoss files