Ant task to edit existing web.xml

C

Chris M

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
 
J

John B. Matthews

Chris M said:
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top