ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billy.ba...@thirty3.net
Subject Re: Starting up tomcat via the <exec> task?
Date Mon, 04 Aug 2003 16:33:24 GMT
Thanks Antoine. I've actually decided to stay with the
<java> task for starting tomcat. I've been having a
hard time getting my whole unit test and build process
automated with start tomcat, executing tests and
shutting down tomcat. I thought the <exec> command
would allow me to shutdown but I've come to realize
that you can do this with <java> as well. 

I've started to use the <parallel> element to support 2
threads and have my tests executed while starting
tomcat but it seems to be hanging after my unit tests
complete. I know there's a bug in 1.5.3 with this
element but I don't think an exceptions are being
thrown. My tests are failing but that's to be expected
right now. My tests failing wouldn't hold up or 'hang'
the process would it?

- Billy -

On Mon, 4 Aug 2003 17:25:59 +0200, "Antoine
Levy-Lambert" wrote:

> 
> It would be
> <exec executable="java">
>     <arg value="-cp"/>
>     <arg value="${java.home}/../lib/tools.jar;..."/>
> .... all your jvm args, ...
>     <arg
value="org.apache.catalina.startup.Bootstrap"/>
>     <arg value="start"/>
> </exec>
> 
> note that in ant1.6alpha there is a spawn attribute
for
> both exec and java.
> I have not tested starting tomcat directly like this
as
> a java process, but
> it should work.
> Why do you want to use <exec/> instead of <java/> to
> start tomcat if you are
> not calling a wrapper shellscript ?
> 
> Cheers,
> 
> Antoine
> 
> 
> 
> ----- Original Message -----
> From: <billy.bacon@thirty3.net>
> To: <user@ant.apache.org>
> Sent: Friday, August 01, 2003 10:32 PM
> Subject: Starting up tomcat via the <exec> task?
> 
> 
> > I know there's a specific task <java> for starting
up
> > tomcat but how would I start up tomcat through the
> > <exec> task... I have the following in my build.xml
> > file...
> >
> > <java
> > classname="org.apache.catalina.startup.Bootstrap"
> > fork="true">
> > <classpath>
> > <pathelement
> > location="${java.home}/../lib/tools.jar"/>
> > <pathelement
> > location="${catalina.home}/bin/bootstrap.jar"/>
> > </classpath>
> > <jvmarg value="-Dvoyager=1"/>
> > <jvmarg
> > value="-Djava.endorsed.dirs=${tc.endorsed.dirs}"/>
> > <jvmarg value="-Dcatalina.home=${catalina.home}"/>
> > <jvmarg value="-Dcatalina.base=${catalina.base}"/>
> > <jvmarg
> > value="-Djava.io.tmpdir=${catalina.tempdir}"/>
> > <jvmarg value="-Dfile.encoding=UTF-8"/>
> > <jvmarg value="-Xmx${catalina.heapsize}m"/>
> > <jvmarg value="-Xdebug"/>
> > <jvmarg value="-Xnoagent"/>
> > <jvmarg value="-Xrunjdwp:transport=${debug.args}"/>
> > <arg value="start"/>
> > </java>
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> >
> >
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message