Ant task to edit existing web.xml

Discussion in 'Java' started by Chris M, Aug 12, 2008.

  1. Chris M

    Chris M Guest

    Hi All,

    I am working on a 3rd party product with a fixed deployment
    descriptor. I am working on a project that is making some enhancements
    to this product and we need to modify the products web xml so that we
    can add some filter and filter mapping definitions.

    I was wondering if this could be done using the projects existing ant
    tasks. Having a quick look at the ant doco, tasks like LoadFile and
    ReplaceRegExp look promising, but I am wondering if there is just a
    much easier solution.

    Has anyone had any experience with this sort of thing?

    Regards,
    Chris
     
    Chris M, Aug 12, 2008
    #1
    1. Advertising

  2. In article
    <>,
    Chris M <> wrote:

    > Hi All,
    >
    > I am working on a 3rd party product with a fixed deployment
    > descriptor. I am working on a project that is making some enhancements
    > to this product and we need to modify the products web xml so that we
    > can add some filter and filter mapping definitions.
    >
    > I was wondering if this could be done using the projects existing ant
    > tasks. Having a quick look at the ant doco, tasks like LoadFile and
    > ReplaceRegExp look promising, but I am wondering if there is just a
    > much easier solution.
    >
    > Has anyone had any experience with this sort of thing?


    I used Filter and Copy ant tasks to make a simple modification to a
    deployment XML file:

    <http://ant.apache.org/manual/CoreTasks/filter.html>
    <http://ant.apache.org/manual/CoreTasks/copy.html>

    Here's an example in target "build":

    <http://robotchase.svn.sourceforge.net/viewvc/robotchase/trunk/build.xml?
    view=markup>

    --
    John B. Matthews
    trashgod at gmail dot com
    home dot woh dot rr dot com slash jbmatthews
     
    John B. Matthews, Aug 13, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor
    Replies:
    0
    Views:
    8,906
    Victor
    Sep 1, 2004
  2. nrm
    Replies:
    3
    Views:
    579
  3. krabhi
    Replies:
    1
    Views:
    9,458
    Marco Meschieri
    Aug 9, 2006
  4. teggy
    Replies:
    0
    Views:
    850
    teggy
    May 29, 2007
  5. Mike
    Replies:
    1
    Views:
    1,986
    GArlington
    May 12, 2008
Loading...

Share This Page