ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Dougherty <MDoughe...@XIFIN.Com>
Subject RE: How to avoid naming conventions in <ejbjar> task
Date Tue, 15 Oct 2002 16:35:54 GMT
> -----Original Message-----
> From: Chekutty, Kiran []
> Sent: Tuesday, October 15, 2002 7:26 AM
> To: Ant Users List
> Subject: How to avoid naming conventions in <ejbjar> task
> Hi Rescuers
> Can I use just ejb-jar.xml & weblogic-ejb-jar.xml rather than 
> having a ejb-name in front of both the deployment 
> descriptors. This is because I am building a ant script for a 
> big project thats developed long before. I need to rename all 
> the deployment descriptors.And I want to avoid doing so. 
> Thanks in advance 
> Kiran Chekutty
> Petrotechnics Ltd.

Use the naming=ejb-name attribute. It will look in the deployment descriptor and use what's
in the <ejb-name> as the name of the resulting jar file. Each of our EJBs is in it's
own directory so we have the same issue. Here's our task:

    <ejbjar descriptordir="${ejb.src.dir}"
      <include name="**/ejb/**/ejb-jar.xml"/>
      <exclude name="**/ejb/**/*weblogic*.xml"/>
        The weblogic task will force the ejbjar task to include any
        WebLogic specific deployment descriptors in the EJB Jar file
        and then compile the jar with WebLogic's ejbc compiler.
      <weblogic destdir="${build.dir}"
          <fileset dir="${weblogic.home}/lib">
            <include name="**/*.jar"/>
          <fileset dir="${lib.dir}">
            <include name="**/*.jar"/>
          <pathelement path="${build.dir}"/>
        Define local locations for the DTD's.
      <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
      <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
      <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB RDBMS Persistence//EN"

This works very well for us. We end up with all our EJBs in a their own JAR compiled, assembled,
and ready to deploy.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message