ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <omen...@usa.net>
Subject Re: [Packaging more than one EJB in the same jar file]
Date Mon, 02 Jul 2001 22:55:25 GMT
Actually I faced with similar problem and I did not find any simple solution.
Problem is - you have to merge XML descriptors (ejb-jar.xml,
weblogic-ejb-jar.xml) and sometimes it is not trivial task (all descriptors
have strong DTD validation, sometimes you have conflicts in ejb component
names, etc.). It is not impossible but I preffered to make two huge xml files
and synchronize them with all small ones.

If you find some tool that allows do that (merging ejb jars, or at least xml
descriptors) please drop a line about it.

regards,
- om.


"Francesco Coda" <fcoda@tiscalinet.it> wrote:
I'd like to package some EJBs into the same jarfile. Is it possible?

Here are the details:
I'm using ant (the optional task ejbjar) to package EJBs into jars for the
deployment in weblogic (5.1). For every EJB (only session beans) I have the
two XML descriptors, named using the task convention ("ejbName-ejb-jar.xml"
and "ejbName-weblogic-ejb-jar.xml").
I am able to create one jar file for each EJB adding the following entry to
the "build.xml":

   <target name="ejb" depends="compile">
      <mkdir dir="${test}/ejb/tc"/>
  <ejbjar srcdir="${build}" descriptordir="${src}" flatdestdir="true">
       <weblogic destdir="${test}/ejb/tc">
        <classpath>
             <pathelement path="${build}"/>
             <pathelement location="D:\weblogic\classes"/>
        <pathelement location="D:\weblogic\lib\weblogicaux.jar"/>
          </classpath>
        </weblogic>

       <include name="**/*-ejb-jar.xml"/>
       <exclude name="**/*weblogic*.xml"/>
       <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
1.1//EN"

location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/ejb-jar.dtd"/
>
         <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"

location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-
jar.dtd"/>

     </ejbjar>
 </target>


I can obtain one single jar file merging all the xml descriptors by hand,
but I don not like this solution.
Is there an automatic way?


Thanks

   Francesco




Mime
View raw message