ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Barclay <>
Subject RE: Build 200 entity beans
Date Fri, 12 Apr 2002 13:16:56 GMT

> -----Original Message-----
> From: John Lindwall []
> Sent: Thursday, April 11, 2002 7:48 PM
> To: 'Ant Users List'
> Subject: Build 200 entity beans
> Our build.xml script needs to build ejb jar files for 200 
> individual entity beans.  What is the best way to encode this 
> in a build.xml file.  I shudder to think of creating 200 
> individual targets.
> I can see creating a generic target to perform the processing 
> (mkdir, copy xml files, run ejbc, etc) but then I still need 
> 200 <antcall> invocations to process all the entity beans.

XSLT has a for-each construct.

(That is, you could write an XSLT transform plus an XML data
file listing your 200 EJBs (or 200 EJB Jar files?) and have
it generate the actual Ant build file.  

The form of the XSLT transformation could be basically the Ant build
file XML with an xsl:for-each loop to generate the actual Ant XML for 
the EJBs.

You might also use XSLT to generate an enternal entity file that
you include (via an XML external entity declaration an a referenece)
into the main Ant build file.  (Or your main Ant build file could
call a generated Ant build file.)

(The options are on of the advantages of XML.)

(Of course, a for-each construct would be convenient too.  (And who
knows, maybe there is one.  (I haven't read the other replies to your 
question yet.)))



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message