You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Vincent Massol <vm...@pivolis.com> on 2004/05/31 22:31:40 UTC

New / tasks

Hi Cactus users,

For those interested, I've just committed new <resin2x>/<resin3x> tasks
in Cactus CVS HEAD. These tasks start and stop Resin instances. They can
be used completely independently of Cactus.

I seem to remember Matt Raible asking for this some time back.

It's a first version so I'm sure there are things to tweak. Feedbacks
are much welcome! 

I'll upload a nightly build + new doc on the website around the end of
this week.

Thanks
-Vincent
Wanna see JUnit in Action?
(http://manning.com/massol) 



RE: New / tasks

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Matt Raible [mailto:lists@raibledesigns.com]
> Sent: 14 June 2004 10:06
> To: 'Cactus Users List'
> Subject: RE: New <resin2x>/<resin3x> tasks
> 
> 
> 
> > -----Original Message-----
> > From: Vincent Massol [mailto:vmassol@pivolis.com]
> > Sent: Monday, May 31, 2004 2:57 PM
> > To: 'Matt Raible'
> > Cc: 'Cactus Users List'
> > Subject: RE: New <resin2x>/<resin3x> tasks
> >
> > When you say a "runcontainer" task do you mean a task to
> > start/stop a container or to run Cactus tests in it (same as
> > the existing <cactus> task?).
> >
> > I'm asking because the current <cactus> task supports your
> > use case (it has "if" attributes for all containers).
> >
> 
> I dig the <cactus> task, so yes, I'm looking for something like that.
> What I would like is the ability for a user to set a property in
> build.properties and it uses that container for testing.  What I'm
> trying to do is make it as easy as possible for me (and users of
> AppFuse) to switch from Tomcat to Resin to Weblogic or whatever Cactus
> supports.

That's what I'm doing. Except of modifying a property I
comment/uncomment them. However you can easily make it even easier. For
example (not a running example):

container.to.run = tomcat4x

then in your build.xml:

<condition property="should.run.tomcat4x">
  <equals arg1="tomcat4x" arg2="${container.to.run}"/>
</condition>
<condition property="should.run.resin2x">
  <equals arg1="resin2x" arg2="${container.to.run}"/>
</condition>
[...]

And then:

<cactus
[...]
  <resin2x [...] if="should.run.resin2x">
  [...]

> 
> I'm trying to get away from running Servlet/Controller/Action tests
> in-container - so I eventually might not need Cactus there.  However,
I
> test my JSPs with Canoo's WebTest and those will always depend on a
> running container.  Currently, I depend on tomcat.start and
tomcat.stop
> targets that I gathered from Cactus examples.  I'm looking for a
simple
> way to start the container, run the tests, and stop it.  From my
> understanding, the <cactus> task has this built in for most containers
-
> and I'd like to re-use that functionality.
> 

I'd also like to make the Cactus Ant tasks as generic as possible so
that they can be reused in other contexts.

Thanks
-Vincent

> Matt
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



RE: New / tasks

Posted by Matt Raible <li...@raibledesigns.com>.

> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com] 
> Sent: Monday, May 31, 2004 2:57 PM
> To: 'Matt Raible'
> Cc: 'Cactus Users List'
> Subject: RE: New <resin2x>/<resin3x> tasks
> 
> When you say a "runcontainer" task do you mean a task to 
> start/stop a container or to run Cactus tests in it (same as 
> the existing <cactus> task?).
> 
> I'm asking because the current <cactus> task supports your 
> use case (it has "if" attributes for all containers).
> 

I dig the <cactus> task, so yes, I'm looking for something like that.
What I would like is the ability for a user to set a property in
build.properties and it uses that container for testing.  What I'm
trying to do is make it as easy as possible for me (and users of
AppFuse) to switch from Tomcat to Resin to Weblogic or whatever Cactus
supports.

I'm trying to get away from running Servlet/Controller/Action tests
in-container - so I eventually might not need Cactus there.  However, I
test my JSPs with Canoo's WebTest and those will always depend on a
running container.  Currently, I depend on tomcat.start and tomcat.stop
targets that I gathered from Cactus examples.  I'm looking for a simple
way to start the container, run the tests, and stop it.  From my
understanding, the <cactus> task has this built in for most containers -
and I'd like to re-use that functionality.

Matt



RE: New / tasks

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Matt Raible [mailto:matt@raibledesigns.com]
> Sent: 31 May 2004 22:46
> To: Vincent Massol
> Cc: 'Cactus Users List'
> Subject: Re: New <resin2x>/<resin3x> tasks
> 
> Actually, what I *really* need is a <runcontainer> task that can do
> <runcontainer server="resin3"> so I can easily switch app servers
based
> on an ant property.  I still have this on my to do list, its just a
low
> priority.

When you say a "runcontainer" task do you mean a task to start/stop a
container or to run Cactus tests in it (same as the existing <cactus>
task?).

I'm asking because the current <cactus> task supports your use case (it
has "if" attributes for all containers).

Thanks
-Vincent

> 
> Thanks,
> 
> Matt
> 
> Vincent Massol wrote:
> 
> >Hi Cactus users,
> >
> >For those interested, I've just committed new <resin2x>/<resin3x>
tasks
> >in Cactus CVS HEAD. These tasks start and stop Resin instances. They
can
> >be used completely independently of Cactus.
> >
> >I seem to remember Matt Raible asking for this some time back.
> >
> >It's a first version so I'm sure there are things to tweak. Feedbacks
> >are much welcome!
> >
> >I'll upload a nightly build + new doc on the website around the end
of
> >this week.
> >
> >Thanks
> >-Vincent
> >Wanna see JUnit in Action?
> >(http://manning.com/massol)
> >
> >
> >
> 




Re: New / tasks

Posted by Matt Raible <ma...@raibledesigns.com>.
Actually, what I *really* need is a <runcontainer> task that can do 
<runcontainer server="resin3"> so I can easily switch app servers based 
on an ant property.  I still have this on my to do list, its just a low 
priority.

Thanks,

Matt

Vincent Massol wrote:

>Hi Cactus users,
>
>For those interested, I've just committed new <resin2x>/<resin3x> tasks
>in Cactus CVS HEAD. These tasks start and stop Resin instances. They can
>be used completely independently of Cactus.
>
>I seem to remember Matt Raible asking for this some time back.
>
>It's a first version so I'm sure there are things to tweak. Feedbacks
>are much welcome! 
>
>I'll upload a nightly build + new doc on the website around the end of
>this week.
>
>Thanks
>-Vincent
>Wanna see JUnit in Action?
>(http://manning.com/massol) 
>
>  
>