Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
The really strange thing is that the virtual machine that launches the dos command does indeed spawn correctly as I can see its process complete. I've even debugged it right to the very end. So it seems that the grandparent process responsible for running the ant java task has some strange

Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
Didn't make any difference. I did however get the stack trace from the ant java task vm and the only non daemon thread dump looks like this: Thread [main] (Suspended) ProcessImpl.waitFor() line: not available [native method] Execute.waitFor(Process) line: 551

Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
The ant-java task needs to be inserted in order to capture the return code of whatever "body" it executes and report back to the user. That's why spawn is set to false. Also fork is set to true so that I can reconfigure all sorts of options such as the maximum amount of memory for the body. U

RE: Calling ant programatically

2009-04-27 Thread Martin Gainty
in your programmatic call what happens if you put in a execTask.setFailonerror(true); execTask.setFailIfExecutionFails(true); http://api.dpml.net/ant/1.7.0/org/apache/tools/ant/taskdefs/ExecTask.html#setFailIfExecutionFails(boolean) before the execute() public static void main(String[] args) t

Re: Calling ant programatically

2009-04-27 Thread glenn opdycke-hansen
Can you insert the Ant project that calls both the Java application and the batch job? If so, then you can use the parallel task, see http://ant.apache.org/manual/CoreTasks/parallel.html On Mon, Apr 27, 2009 at 12:42 PM, Ashley Williams wrote: > Ok here's a little more context. > > It seems tha

Re: Calling ant programatically

2009-04-27 Thread Ashley Williams
Ok here's a little more context. It seems that the exec/spawn=true command works as expected when called on its own directly from java.exe but not from an intermediate ant java task, so: 1. GOOD... When I launch the cmd.exe from a programmatic ant exec task, the exec task and java.exe both