> -----Original Message-----
> From: Matt Raible [mailto:[EMAIL PROTECTED]
> Sent: 25 February 2004 02:03
> To: Cactus Users List
> Subject: Re: Starting/Stopping Resin with Ant
>
> From:
> http://www.mail-archive.com/[EMAIL PROTECTED]/
> msg04762.html
>
> <snip>
> Yes, I'd also like that we add <startcontainer>/<stopcontainer> Ant
> tasks for starting/stopping containers. It should be very easy to
> implement as we're already doing it in the <cactus> task. We could
> probably even reuse the existing <[container name]> nested elements
> (they're already Ant task in their implementation I think), and simply
> add an "action" attribute (action="start|stop"). Anyone wishing to
help?
> </snip>
>
> I'm willing to help, but I wouldn't know where to start. Point me in
> the right direction (a high-level task list would be fine) and I'll
see
> what I can do.
Very cool! Here are some informations:
1/ the code is located in CVS in jakarta-cactus/integration/ant/src/java
and jakarta-cactus/integration/ant/src/test.
2/ the Ant tasks themselves (e.g. CactusTask) are in the
o.a.c.integration.ant package.
3/ the nested container elements <resin3x>, etc are located in
o.a.c.i.a.container.*
4/ I'm not too sure to implement the feature. The best solution is
probably to create a startcontainer/stopcontainer tasks (or a single
<run> task with an action attribute) in o.a.c.i.a package and let it
accept a nested AbstractContainer element. The other option would be to
directly try to reuse the existing container elements as top level Ant
tasks but adding to them an action attribute (action="start|stop"). It
may require other attributes. The first solution is probably cleaner.
Let me know if you need more guidance.
Thanks
-Vincent
>
> Thanks,
>
> Matt
>
> On Feb 24, 2004, at 5:42 PM, Matt Raible wrote:
>
> > Thanks for the link Vincent. To be honest, I'd rather use the
> > <cactus> task since I know that works, and I can use that for Cactus
> > tests. But for running my JSP tests (with Canoo's webtest), I start
> > tomcat, run the tests, and then stop it. I'm trying to do the same
> > thing for resin and then have an ant property that allows users to
> > easily switch between tomcat and resin.
> >
> > Here's what I have. The start.resin target works fine, but the
> > stop.resin target just hangs (when called in <runservertests>).
> >
> > <!--
> > ===================================================================
> > -->
> > <!-- Start Resin
> > -->
> > <!--
> > ===================================================================
> > -->
> > <target name="start.resin"
> > description="starts resin in current console window">
> >
> > <java classname="org.apache.cactus.ant.ResinRun" fork="yes">
> > <arg value="-start"/>
> > <jvmarg
> > value="-Djava.util.logging.manager=com.caucho.log.LogManagerImpl"/>
> >
> > <classpath>
> > <path refid="cactus.classpath"/>
> > <fileset dir="${env.RESIN_HOME}/lib"
includes="*.jar"/>
> > </classpath>
> > </java>
> > </target>
> >
> > <!--
> > ===================================================================
> > -->
> > <!-- Stop Resin
> > -->
> > <!--
> > ===================================================================
> > -->
> > <target name="stop.resin" description="stops resin">
> >
> > <java classname="org.apache.cactus.ant.ResinRun" fork="yes">
> > <arg value="-stop"/>
> > <jvmarg
> > value="-Djava.util.logging.manager=com.caucho.log.LogManagerImpl"/>
> >
> > <classpath>
> > <path refid="cactus.classpath"/>
> > <fileset dir="${env.RESIN_HOME}/lib"
includes="*.jar"/>
> > </classpath>
> > </java>
> > </target>
> >
> > Also, I like the <cactus> task, but I can't use it to test both
Tomcat
> > and Resin back-to-back. If I could use <antcall> between the two -
> > that'd be awful slick. ;-)
> >
> > Matt
> >
> >
> > On Feb 24, 2004, at 10:08 AM, Vincent Massol wrote:
> >
> >> Hi Matt,
> >>
> >> So you'd like to start/stop Resin manually instead of using the
> >> <resin2x>/<resin2x> nested element of the <cactus> task?
> >>
> >> If so, you can use the following as a template:
> >>
http://cvs.apache.org/viewcvs.cgi/jakarta-cactus/integration/ant/src/
> >> scr
> >> ipts/share/build-tests-resin2x.xml?rev=1.6&view=auto (it's for
Resin
> >> 2.x). FYI, that's the old scripts we were using before we migrated
to
> >> the <cactus> task.
> >>
> >> Thanks
> >> -Vincent
> >>
> >>> -----Original Message-----
> >>> From: Matt Raible [mailto:[EMAIL PROTECTED]
> >>> Sent: 24 February 2004 17:34
> >>> To: Cactus Users List
> >>> Subject: Starting/Stopping Resin with Ant
> >>>
> >>> Is it possible to re-write the following two targets to start/stop
> >>> Resin instead of Tomcat?
> >>>
> >>> <!--
> >>>
===================================================================
> >> -->
> >>> <!-- Start Tomcat
> >>> -->
> >>> <!--
> >>>
===================================================================
> >> -->
> >>> <target name="start.tomcat"
> >>> description="starts tomcat in the current console
window">
> >>> <java classname="org.apache.catalina.startup.Bootstrap"
> >>> fork="yes">
> >>> <jvmarg value="-Dcatalina.home=${tomcat.home}"/>
> >>> <arg value="start"/>
> >>> <classpath>
> >>> <pathelement
path="${java.home}/../lib/tools.jar"/>
> >>> <fileset dir="${tomcat.home}">
> >>> <include name="bin/bootstrap.jar"/>
> >>> </fileset>
> >>> </classpath>
> >>> </java>
> >>> </target>
> >>>
> >>> <!--
> >>>
===================================================================
> >> -->
> >>> <!-- Stop Tomcat
> >>> -->
> >>> <!--
> >>>
===================================================================
> >> -->
> >>> <target name="stop.tomcat" description="stops tomcat">
> >>> <java classname="org.apache.catalina.startup.Bootstrap"
> >>> fork="yes">
> >>> <jvmarg value="-Dcatalina.home=${tomcat.home}"/>
> >>> <arg value="stop"/>
> >>> <classpath>
> >>> <fileset dir="${tomcat.home}">
> >>> <include name="bin/bootstrap.jar"/>
> >>> </fileset>
> >>> </classpath>
> >>> </java>
> >>> </target>
> >>>
> >>> Thanks,
> >>>
> >>> Matt
> >>>
> >>>
> >>>
---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail:
[EMAIL PROTECTED]
> >>
> >>
> >>
> >>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]