so, on windows, I wanted to use ant to call `exec`...
# random
g
so, on windows, I wanted to use ant to call
exec
in the background from ant, and I'm stunned at how hard it is. The internet suggested
Copy code
<exec executable="cmd">
  <arg value="/C"/>
  <arg value="start"/>
  <arg value="/B"/>
  <arg value="${myProgram}"/>
</exec>
except that if
myProgram
contains spaces then this solution fails. Further, if you quote wrap it, the quotes are stripped off prematurely by one of the three interpreters looking at the value so
myProgram
has to be a one-word thing. My only work-around was to explicitly set the working directory with an
<exec ... dir="..../bin">
Does anybody here have a better solution?
k
I'd try asking on the ant irc if there's one.
d
\\
will escape spaces on Windows, did you try that?