ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: ANT best practices
Date Tue, 04 Mar 2003 12:56:27 GMT
On Tuesday, March 4, 2003, at 04:33  AM, Matthew Oatham wrote:
> Hi,
> OK I've ordered Java Development with Ant book

Thank you!

> I create a base jar which will be used for deployment on different App 
> servers so this base jar needs different deployment descriptors added 
> to it depending on the target app server. In one build run a jar needs 
> to be created for deployment on 4 different app servers therefore I 
> seem to have a number of options:

EJB JAR?  So you need different vendor-specific deployment descriptors? 
  Or different ejb-jar.xml files?

If its different vendor-specific deployment descriptors, you can 
typically let them all happily coexist in a single JAR file and there 
is no need to build different ones for each vendor.  In my current 
project one EAR can deploy to both JRun and JBoss and it has both 
vendor-specific pieces embedded in META-INF.

If you need different ejb-jar.xml files then, hmmm, something is wrong 
with J2EE! :))  But if thats the case, why?

Notice I'm asking about the root issue rather than giving Ant specific 
answers here.  Ant can accommodate what you need, sure, but more 
information is needed to determine the right next step.

Also, are you using XDoclet to build your deployment descriptors?  If 
not, I'd recommend you do so.  It'll make life so much more pleasant.

> For each app server run a jar task specifying the directories of class 
> of files plus the specific deployment descriptor. Perhaps a bit of 
> redundancy re-running a jar task all the time?

Do you need 4 different JAR's in one build?  Or will a build be 
app-server specific?


View raw message