aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes ant sql task in different jvm/process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant sql task in different jvm/process" Watch "ant sql task in different jvm/process" New topic
Author

ant sql task in different jvm/process

Gaurav Kr. Arora
Ranch Hand

Joined: Feb 20, 2011
Posts: 37
Hi,

I am new to ant and before sending mail to this list I explored the issue on google but didn't get any satisfactory results.

In one of my project, I require to run the below sql task in a different jvm or a different process.



Actually in my build.xml file, I call a junit test using junit task and in that task I use fork=yes so that it runs in a different jvm.

But before running the junit task I need to run the sql task, but somehow it happens that both sql task and junit tasks are running in same jvm which I don't want.

Could you please help me in making sure that the sql task which I run should run in a separate jvm / process ? Can we specify fork=yes or some other attribute to do this?

Thanks!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

There is no fork option for the sql task. If you really want the sql statement to run is a separate process, some of your options are:

a) use the <exec> task to run Oracle's command line sql tool, passing it the sql file

b) use the <java> task to run another copy of Ant to run the sql task

There are probably other variations. I would go with option a.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ant sql task in different jvm/process