ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: "clone" ejb-jar with input from XML file
Date Sat, 11 Jun 2005 17:41:06 GMT
Excellent.  It threw me for a while when you accidently used the "value"
attribute instead of the "path" attribute, but this looks like I could
get some mileage out of it.

> -----Original Message-----
> From: Brian Agnew [mailto:brian@oopsconsultancy.com] 
> 
> 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="@name"/>
>   </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@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
> >
> >  
> >
> 
> -- 
> 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@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message