ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Inskeep <>
Subject Re: Help with EJBJAR
Date Wed, 25 Oct 2000 21:12:06 GMT
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.


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 :)
> >
> > <pre>
> >    <target name="ejbs" depends="compile">
> >      <mkdir dir="${ejbdeploy.temp.dir}" />
> >      <ejbjar srcdir="${build.dir}"
> >              descriptordir="${src.dir}">
> >        <include name="**/*ejb-jar.xml"/>
> >        <exclude name="**/*weblogic-ejb-jar.xml"/>
> >        <exclude name="**/ejb-jar.xml"/>
> >        <weblogic destdir="${ejbdeploy.temp.dir}"
> >                  classpath="${classpath.weblogic};${build.dir}"/>
> >      </ejbjar>
> >    </target>
> > </pre>
>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, and
> 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
>     --> ICQ: 34550587

View raw message