Bug 42410

Summary: New ant task sugestion... <inject-xml>
Product: Ant Reporter: Dmitriy Likhten <dlikhten>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Dmitriy Likhten 2007-05-14 09:06:13 UTC
At my job I wrote an ant task which I believe can be extremely useful to put
into ant... This task does the following:
Take a file "target file" and replace a token in that target file with the token
itself, a newline, and entire contents of a "source file".

This is specifically written to work with XML and not a flat file, but the task
would create some comment markers so that the changes can be undone (by
specifying the "source file" and the markers will provide info on what needs to
be deleted). The goal was also to ensure that more than 1 run would not create
duplicate code in the "target file", as well as the ability to undo the changes.

The idea is for doing things like: Modifying web.xml to inject it with new
information (lets say we modify some client's install) by injecting web.xml with
 some other file which contains a list of custom servlet mappings.

In any case, I thought I would put the idea out there, if you guys like it I can
send you what I have, it needs some work to make it a completely generic
ant-task but it seems like a nice thing to have. I do not know how many people
need this sort of functionality. Maybe this is more inline with the ant-contrib
library?

--Dmitriy