ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Background task to start Tomcat 4.1
Date Wed, 09 Apr 2003 18:55:57 GMT
Probably is, but Cactus has custom Ant tasks just for the purpose you're
after it seems to me, and even though I don't use it myself, and have no
experience in this area, people are saying good things about Cactus...

So provided that I don't have an answer to your question, but know of the
recommended way to do what are you doing, I'm just passing along the info.
It's like JUnit: you can do Java unit testing without it, but it's usually
better (and recommended as well) to use it for that purpose.

That said, I also have a hard time picking up all these technologies... Lots
of them on my radar screen I just can't seem to get to. Good luck, --DD

-----Original Message-----
From: Karsten Wutzke [mailto:kwutzke@starconcept.de] 
Sent: Wednesday, April 09, 2003 1:55 PM
To: Ant Users List
Subject: Re: Background task to start Tomcat 4.1

Isn't it possible with Ant in some way?

I'm really getting overkilled by all these API's...

Karsten

Dominique Devienne wrote:

> Have you looked into Cactus? Seems like the way to go... --DD
> 
> -----Original Message-----
> From: Karsten Wutzke [mailto:kwutzke@starconcept.de] 
> Sent: Wednesday, April 09, 2003 1:35 PM
> To: user@ant.apache.org
> Subject: Background task to start Tomcat 4.1
> 
> How do I run a background task to start Tomcat 4.1 in Ant? I want to 
> start the server, if it is not running yet. However, the <exec> and 
> <java> tasks I tried don't seem to be able to do that. I also tried 
> <parallel>, but Ant just seems to hang on that task.
> 
> The target I wrote:
> 
> <property name="local.bootstrap.class" 
> value="org.apache.catalina.startup.Bootstrap"/>
> 
> <property name="local.bootstrap.jar.file" 
> location="${env.CATALINA_HOME}/bin/bootstrap.jar"/>
> 
> <path id="local.bootstrap.classpath">
>    <pathelement path="${local.bootstrap.jar.file}"/>
> </path>
> 
> <target name="start-local" description="Starts local Tomcat.">
>    <!-- server already running? yes:bye, no:startup ... but how? -->
>    <java classname="${local.bootstrap.class}" fork="true">
>      <classpath refid="local.bootstrap.classpath"/>
>      <arg value="start"/>
>      <sysproperty key="java.endorsed.dirs" 
> value="${env.CATALINA_HOME}/bin:${env.CATALINA_HOME}/common/endorsed"/>
>      <sysproperty key="catalina.base"      value="${env.CATALINA_HOME}"/>
>      <sysproperty key="catalina.home"      value="${env.CATALINA_HOME}"/>
>      <sysproperty key="java.io.tmpdir" value="${env.CATALINA_HOME}/temp"/>
>    </java>
> </target>
> 
> I drew the Java system properties from the startup scripts in the Tomcat 
> bin directory, especially catalina.sh.
> 
> The task itself works fine. It starts up the server, however... Ant 
> hangs, because the task is not run in the background...
> 
> Can it be done, so that the task is spawnes in the background? What 
> about the <spawn> task I've heard about? Does it live?
> 
> Karsten
> 
> 
> 
> ---------------------------------------------------------------------
> 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