ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kurniawan, Rainier" <rkurnik...@MassMutual.com>
Subject Ejb Jar problem
Date Thu, 27 Sep 2001 15:57:44 GMT
Hi all, 





     I am using ant1.4 to build my project using the ejbjar tasks to create
my EJB jar files. I'm using 1 build.xml to compile all my classes. The
problem is my I create my ejbjar files I want to include all the classes in
that directory but not all classes in my compiled directory. For example 

ps: weblogic 5.1 jdk 1.2.2 

com/ex/A/

        Ahome.java

        ABean.java 

        A.java 

        someotherclass.java 



com/ex/B/ 

        Bhome.java

        BBean.java

        B.java 

        anotherclass.java 

I just want to include someotherclass.class in A.jar not b.jar 

           

build.xml



********************************

        <target name="compile" depends="prepare">

       <javac srcdir="${src.home}" destdir="${deploy.classes}"

           classpath="${ENV.WLS_CLASSPATH};${deploy.classes}"

           debug="on" optimize="off" deprecation="off">

        <include name="${src.include}"/> 

       </javac>

       </target>





<target name="package-ejb" depends="prepare,compile">

       <copy todir="${deploy.classes}">

         <fileset dir="${src.home}">

            <include name="**/*.xml">

            </include>

         </fileset>

       </copy> 

      <ejbjar descriptordir="${deploy.classes}" 

        destdir = "${dist.home}" flatdestdir="true"

        srcdir="${deploy.classes}">

         <include name="**/${ejbdds}"/>

         <exclude name="**/*-weblogic-ejb-jar.xml"/>

          <support dir="${deploy.classes}"> 

                        <include name="*.class"/> 

          </support>

         <weblogic destdir="${dist.home}" keepgeneric="NO" suffix=".jar">

           <classpath>

             <pathelement path="${ENV.JAVA_CLASSPATH};${ENV.WLS_CLASSPATH};

              ${deploy.classes}"/> 

           </classpath>

         </weblogic>



       <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
1.1//EN" 

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


       <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN" 

 
location="${ENV.WLS_HOME}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-j
ar.dtd"/>

      </ejbjar> 





*********************************



         The problem is when I do not include <support> element it creates
the ejb.jar and deploy fine but when I invoke the ejb it complains about not
finding com/ex/sometherclass package. 

        But when I inculde the support eleement like above all the classes
get included in all the jar file. 



        Anybody has a better idea to do this ? 





Thanks

Rainier Kurniawan 



          





Mime
View raw message