Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 95656 invoked from network); 25 Oct 2000 21:13:00 -0000 Received: from unknown (HELO beamail.beasys.com) (63.96.163.29) by locus.apache.org with SMTP; 25 Oct 2000 21:13:00 -0000 Received: from boulder.beasys.com (boulder [192.168.32.10]) by beamail.beasys.com (8.9.1b+Sun/8.9.1) with ESMTP id OAA05442 for ; Wed, 25 Oct 2000 14:12:36 -0700 (PDT) Received: from pyxis.bea.com ([192.168.32.191]) by boulder.beasys.com (8.9.1b+Sun/8.9.1) with ESMTP id PAA04797 for ; Wed, 25 Oct 2000 15:13:04 -0600 (MDT) Message-Id: <4.3.0.20001025145502.00b79db0@boulder.beasys.com> X-Sender: dinskeep@boulder.beasys.com X-Mailer: QUALCOMM Windows Eudora Version 4.3 Date: Wed, 25 Oct 2000 15:12:06 -0600 To: ant-user@jakarta.apache.org From: Dave Inskeep Subject: Re: Help with EJBJAR In-Reply-To: References: <4.3.0.20001025140623.00b97960@boulder.beasys.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N ejbjar is cool - it looks through the ejb-jar.xml file and decides from there what class files are needed. The way this target below works is that it searches my source tree (specified by descriptordir), where the .java and .xml files live, for anything named *ejb-jar.xml. All of my bean descriptor xml files are named like bean1-ejb-jar.xml and bean1-weblogic-ejb-jar.xml. For each bean-ejb-jar.xml file it finds, it scans the xml file and takes the classes it needs from my build directory (where my class files but not java files live). It builds the generic jar file and passes that to the nested weblogic element to build the weblogic-specific jar. The weblogic jar will be named bean1.jar and be placed in destdir in the package tree. The actual compiliation of java files into my build directory is done by the compile target, which the ejbs target depends on. Dave At 10:44 PM 10/25/00 +0200, you wrote: >On Wed, 25 Oct 2000, Dave Inskeep wrote: > > > Here's the target that I've been using. Not perfect, but it > > works. > > > > (pre tags added for those with HTML mail readers, you can > > leave those out :) > > > >
> >    
> >      
> >       >              descriptordir="${src.dir}">
> >        
> >        
> >        
> >         >                  classpath="${classpath.weblogic};${build.dir}"/>
> >      
> >    
> > 
> >because i am til friday not at work - tomorrow is in austria a >red-letter day ;) - i cannot test this. so the next question >could be very silly. i hope not. > >usually for compiling a bean you need at least thres java source >files (remote and home interface and the bean itself). let us >assume these three are named Xhome.java, X.java and >Xbean.java. this is the convention we use at work. and because >this bean is a session bean i need an additional ejb-jar.xml and >a weblogic-ejb-jar.xml. and all this files - and only these files >- are located in e.g. /home/java/anttest/ > >so how would the target would look like? i cannot imagine how >this works. i dont got it. > >first i have to compile the class files i think. right? e.g. with >the javac task. but how does the ejbjar task know what files to >take? does it extract this info from the deployment descriptor or >does it simply takes all classes in the src dir? > >-- >cu, goofy > >To predict the future, you must know the past. -Pat Artis > --> http://yasd.dhs.org/ ICQ: 34550587