Use Ant 1.6 and <exec spawn="true"/>. Before 1.6 there are complicated hacks - and I don�t know if they really work.
Jan > -----Original Message----- > From: Tom Elrod [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 16, 2004 7:35 AM > To: [EMAIL PROTECTED] > Subject: launching bat file in new process > > > Hello. I am trying to figure out a way to launch a bat file > within ant > and have it continue on with the ant build. I have seen a few post > regarding this, but none of the suggestions from those posts > are working > for me. I am using ant 1.5.4 on Windows. > > Here are one of the tasks I have tried, but did not work (the > bat file > process will start, but ant will wait till I actually kill the bat > process and close the dos window). > > <exec dir="${env.J2EE_HOME}/pointbase/tools/serveroption" > executable="cmd" > output="pointbase.log" failonerror="true"> > <arg line="/c call start > ${env.J2EE_HOME}\pointbase\tools\serveroption\startserver.bat"/> > </exec> > > I tried all different combinations of using /c, call, and > start. Also > created another bat file that called this one and did not work either. > > Another weird occurrence it that the startserver.bat is actually just > running the java vm (using bat file to setup env props). So > I created > the following taks to try to run the java process with the fork > attribute set to true, and ant will still block on this task and not > continue processing. > > <java classname="com.pointbase.net.netServer" > fork="true" > failonerror="true" > maxmemory="512m" > > > <jvmarg > value="-Ddatabase.home=${env.J2EE_HOME}\pointbase\databases > -Dpointbase.ini=${env.J2EE_HOME}\pointbase\tools\serveroption\ > pointbase.ini"/> > <classpath> > <pathelement > location="${env.J2EE_HOME}\pointbase\lib\pbembedded.jar"/> > </classpath> > </java> > > Anyone have any ideas how I can get the process (in this case > pointbase) > started and continue on with my ant build? > > Thanks. > > -Tom > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
