ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Elrod <tel...@e2technologies.net>
Subject launching bat file in new process
Date Tue, 16 Mar 2004 06:35:22 GMT
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message