Gennis,

Thanks for posting this.... you just saved me 10 - 15 minutes of work and
I'm sure we can all use any extra time we can squeeze into our projects.

    Erik


----- Original Message -----
From: "Gennis Emerson" <[EMAIL PROTECTED]>
To: "Cactus Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 10:46 PM
Subject: Re: conditional building of Cactus deployments


> Erik Hatcher wrote:
> >
> > ----- Original Message -----
> > From: "Vincent Massol" <[EMAIL PROTECTED]>
> > > yep, except I don't how it would work. The filter work this way: you
> > define
> > > a token in your web.xml (such as @cactus.web.xml@) and then in
build.xml,
> > > you would define the filter : <filter token="cactus.web.xml"
> > value="xxx"/>.
> > >
> > > The problem is xxx ? Are you going to write the full cactus web.xml
part
> > in
> > > a string ... ?
> >
> > Yes.
> >
> > <filter filtersfile="..."/>
> >
> > The filters file would have the full Cactus web.xml part.  Wouldn't be
> > pretty, but it would never need to be touched once specified.  It'd get
too
> > ugly with &lt;, &gt;, and &quot; stuff in a <filter> 'value'.
>
>
> I've been doing essentially that for a while and been satisfied with it.
>
> In my web.xml:
>
>   <servlet> tags
>
>   @cactus.redirectorservlet@
>
>   <servlet-mapping> tags
>
> In build.xml, for regular builds:
>
>   <filter token="cactus.redirectorservlet" value=""/>
>   <copy todir="${webapp.dir}/WEB-INF"
>         file="${basedir}/etc/web.xml"
>         filtering="yes"/>
>
> and for test builds:
>
>   <filter filtersfile="${basedir}/etc/test/cactus.properties"/>
>   <copy file="${basedir}/etc/web.xml"
>         todir="${webapp.dir}/WEB-INF"
>         overwrite="yes"
>         filtering="yes"/>
>
> I put the config in cactus.properties because it seemed like an easy
> place to find it. This isn't going to wrap very well:
>
> cactus.redirectorservlet = \
>     <servlet> \
>      <servlet-name>ServletRedirector</servlet-name> \
>
>
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class
>
> \
>     </servlet> \
>     <servlet-mapping> \
>      <servlet-name>ServletRedirector</servlet-name> \
>      <url-pattern>/ServletRedirector/</url-pattern> \
>     </servlet-mapping>
>
>
> Basically, the run-tests target does a regular compilation, then
> compiles the test classes into the same web app, copies in test support
> files (junit, cactus, the filtered web.xml), and runs the tests. We
> don't deploy with war files, so I don't have any experience with that.
>
> Gennis
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to