ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Stark <>
Subject exec on batch file causes build to hang
Date Fri, 14 Aug 2009 19:25:07 GMT
I'm not sure if this is an Ant problem or a batch file problem, so I'll
start here -- apologies if it's inappropriate.

I'm using an Ant build file to execute a Windows XP batch file using the
exec command. My target looks something like this:

      <exec executable="${VCC_CBU_ICdir_root}${file.separator}IC_start.bat"

The problem is, spawn="true" results in an error:

      spawn does not allow attributes related to input, output, error,
      spawn also does not allow timeout
      finally, spawn is not compatible with a nested I/O <redirector>,

      C:\working\stop_restart.xml:78: You have used an attribute or nested
element which is not compatible with spawn

However, if I remove spawn="true", the control never gets returned to the
Ant build file (the batch file starts up a java process that never actually
completes unless the process is killed), so the build hangs and never

I've used this exact syntax on other batch files running similar java
processes, and it works perfectly. I'm not sure what's causing this one to
hang, and I don't understand the spawn error messages. Any thoughts?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message