Ant build script to update data source in server.xml
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   yashvant_chauhan
Posted On:   Tuesday, May 30, 2006 01:28 AM

I have a task to update the server.xml and context.xml of tomcat 5.5 using Ant script.
first read the server.xml and context.xml
if required Data Source is created in server.xml and context.xml, then it does not need to modify these file
else add the entry in server.xml and context.xml to create the required Data Source

Thanks for and help

yash

Re: Ant build script to update data source in server.xml

Posted By:   Anonymous  
Posted On:   Wednesday, May 31, 2006 05:19 AM

Use a template file and a for inserting the correct values and always "create" the server.xml and context.xml.


external task library: xmltask


select the files if they dont contain the definition () and insert the definition ()

Re: Ant build script to update data source in server.xml

Posted By:   Robert_Lybarger  
Posted On:   Tuesday, May 30, 2006 08:15 PM

I might attack that by writing an XSLT (granted, something to learn if you don't know it) and then use Ant's built-in "xslt" task to do the transformation. If you are processing xml files and need Ant to do it, this is the best way, in my opinion.
About | Sitemap | Contact