You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chris Hatton <ch...@yahoo.com> on 2002/04/03 01:33:55 UTC

Running a server in a separate JVM

I'm attempting to use ant to start/stop Tomcat 4.0 to
improve the turn around time on testing my server side
code.

I have been using the following target to start
Tomcat...

	<target name="Start_Tomcat" description="Starts the
server">
	    <exec dir="${JAVA_HOME}\bin" executable="java">
		<arg line="-jar -Duser.dir=${TOMCAT_HOME}
${TOMCAT_HOME}\bin\bootstrap.jar start"/>
	    </exec>
	</target>

However, this process blocks until Tomcat exits.  Does
anyone know of a way I can run this in a separate JVM,
so that ant will return from this target before I kill
Tomcat?

Thanks in advance!

Chris Hatton
Software Engineer
Denver, CO

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Running a server in a separate JVM

Posted by Mike Williams <mw...@agentissoftware.com>.
  >>> "Chris" == Chris Hatton <ch...@yahoo.com>

  Chris> I'm attempting to use ant to start/stop Tomcat 4.0 to improve the
  Chris> turn around time on testing my server side code.

  Chris> I have been using the following target to start Tomcat... However,
  Chris> this process blocks until Tomcat exits.  Does anyone know of a way
  Chris> I can run this in a separate JVM, so that ant will return from
  Chris> this target before I kill Tomcat?

Cactus provides a 'runservertests' task, that should do what you want.

    http://jakarta.apache.org/cactus/howto_ant_cactus.html

-- 
cheers,
MikeW



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Running a server in a separate JVM

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
"yes"/"on"/"true".... all the same for Ant!  (anything else is false)


----- Original Message -----
From: "Erik" <er...@sumerduckva.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Tuesday, April 02, 2002 8:24 PM
Subject: RE: Running a server in a separate JVM


> Oops... according to the docs, it should actually be fork="yes".
>
> > Try using the <java> task with a fork="true" instead of exec.
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Running a server in a separate JVM

Posted by Erik <er...@sumerduckva.com>.
Oops... according to the docs, it should actually be fork="yes".

> Try using the <java> task with a fork="true" instead of exec.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Running a server in a separate JVM

Posted by Erik <er...@sumerduckva.com>.
Try using the <java> task with a fork="true" instead of exec.

-----Original Message-----
From: Chris Hatton [mailto:chris0hatton@yahoo.com]
Sent: Tuesday, April 02, 2002 6:34 PM
To: ant-user@jakarta.apache.org
Subject: Running a server in a separate JVM


I'm attempting to use ant to start/stop Tomcat 4.0 to
improve the turn around time on testing my server side
code.

I have been using the following target to start
Tomcat...

	<target name="Start_Tomcat" description="Starts the
server">
	    <exec dir="${JAVA_HOME}\bin" executable="java">
		<arg line="-jar -Duser.dir=${TOMCAT_HOME}
${TOMCAT_HOME}\bin\bootstrap.jar start"/>
	    </exec>
	</target>

However, this process blocks until Tomcat exits.  Does
anyone know of a way I can run this in a separate JVM,
so that ant will return from this target before I kill
Tomcat?

Thanks in advance!

Chris Hatton
Software Engineer
Denver, CO

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>