| "clone " ejb-jar with input from XML file | "clone " ejb-jar with input from XML file 2005-06-11 - By Brian Agnew
You can do this with <xmltask> and the <call> instruction. Using <call> you can call a subtarget setting properties etc. as required.
e.g. some pseudocode if your ejb requirements, names etc. are specced in an xml file called ejbs.xml
<xmltask source="ejbs.xml"> <call path="/ejbs/ejb" target="build-ejb-jar"> <param name="ejb-name" value="@(protected)"/> </call> </xmltask>
Of course the above depends on the precise specification of your input XML file.
http://www.oopsconsultancy.com/software/xmltask/
Brian
Karr, David wrote:
>Using Ant 1.5.4 and JDK 1.4.2 (No flexibility here). > >I have a complex series of build operations I want to perform, >concerning an ejb-jar and an input XML file. I'm looking for some >advice on what tools and pieces I can use to get this done. > >My input will be an ejb-jar file and an XML file describing what I need >to produce. For each of a particular element in the XML file, I will >produce a "clone" ejb-jar where the ejb-jar.xml file is identical to the >original except the "ejb-name" element will have a prefix added to it, >and several environment entries will be added. > >This would be straightforward in pure Java, but I'm trying to do as much >of this with Ant and xslt as possible. Some pieces of this are >straightforward with Ant, but some of the structural elements are not. I >think the hard part is parsing the XML file to determine exactly what >information to set in the cloned ejb-jar.xml file, and doing this in a >loop (essentially). > >Would adding Beanshell (through BSF through Ant) make this easier to >accomplish? I've only briefly looked at this. > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@(protected) >For additional commands, e-mail: user-help@(protected) > > >
-- Brian Agnew http://www.oopsconsultancy.com OOPS Consultancy Ltd brian @ oopsconsultancy.com Tel: +44 (0)7720 397526 Fax: +44 (0)20 8682 0012
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |