Bug 42410 - New ant task sugestion... <inject-xml>
Summary: New ant task sugestion... <inject-xml>
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: unspecified
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-14 09:06 UTC by Dmitriy Likhten
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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