> -----Original Message-----
> From: Christopher Lenz [mailto:[EMAIL PROTECTED]
> Sent: 12 March 2003 10:27
> To: Cactus Developers List
> Subject: Re: cvs commit: jakarta-cactus/integration/ant build.xml
> 
> Hi Vincent,
> 
> yeah, I've noticed the failing tests :-)
> 
> I've also started trying to understand the code and refactoring some
> weird-looking stuff, but I'm starting to get the feeling that the
> approach chosen in the WebMerge class isn't quite up to the job. Have
> some rough ideas for a cleaner, more flexible design that also allows
me
> to implement the nested <redirector> elements, so I might be
committing
> some drastic changes in the next couple of days.
> 

Cool! Just as long as it easily merges web.xml files without introducing
a new dependency on another external jar... :-)

Note that ideally we also need to support the following use case:

Cactus provided web.xml
-----------------------

<servlet>
  <servlet-name>ServletRedirector</servlet-name>
  <servlet-class>o.a.c.server.ServletTestRedirector</servlet-class>
</servlet>

User provided web.xml
---------------------

<servlet>
  <servlet-name>ServletRedirector</servlet-name>
  <init-param>
    <param-name>param1</param-name>
    <param-value>value1 used for testing</param-value>
  </init-param>
</servlet>

and the merged result would be:

<servlet>
  <servlet-name>ServletRedirector</servlet-name>
  <servlet-class>o.a.c.server.ServletTestRedirector</servlet-class>
  <init-param>
    <param-name>param1</param-name>
    <param-value>value1 used for testing</param-value>
  </init-param>
</servlet>

A good test case is the web.xml in the integration Ant which needs to be
split into 2:
- the cactus provided web.xml
- a "user" web.xml provided by the servlet sample project

Thanks
-Vincent

> -chris
> 
> Vincent Massol wrote:
> > Ok. Be careful that it is not working yet... I still need to debug
and
> > improve it (Code need to be changed so that the Test Case pass -
> > Test-First programming hehe ...). However, if you have an itch to
> > scratch, please feel free to do it! (I'd love that, as I'm 200%
occupied
> > by my junit book ATM) :-)
> >
> > Thanks Chris
> > -Vincent
> >
> >
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >>Sent: 11 March 2003 09:22
> >>To: [EMAIL PROTECTED]
> >>Subject: cvs commit: jakarta-cactus/integration/ant build.xml
> >>
> >>cmlenz      2003/03/11 00:22:05
> >>
> >>  Modified:    integration/ant build.xml
> >>  Log:
> >>  Add the new <webmerge> task to the Cactus tasks properties file
> >>
> >>  Revision  Changes    Path
> >>  1.3       +2 -0      jakarta-cactus/integration/ant/build.xml
> >>
> >>  Index: build.xml
> >>
===================================================================
> >>  RCS file: /home/cvs/jakarta-cactus/integration/ant/build.xml,v
> >>  retrieving revision 1.2
> >>  retrieving revision 1.3
> >>  diff -u -r1.2 -r1.3
> >>  --- build.xml     8 Feb 2003 16:26:01 -0000       1.2
> >>  +++ build.xml     11 Mar 2003 08:22:05 -0000      1.3
> >>  @@ -118,6 +118,8 @@
> >>             comment="Cactus Tasks for Ant">
> >>               <entry key="runservertests"
> >>
> >>value="org.apache.cactus.integration.ant.RunServerTestsTask"/>
> >>  +            <entry key="webmerge"
> >>  +
> >
> > value="org.apache.cactus.integration.ant.WebMergeTask"/>
> >
> >>           </propertyfile>
> >>
> >>           <javac srcdir="${src.java.dir}"
> >>destdir="${target.classes.java.dir}"
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to