U don't need to build ear every time to test
application
In your application.xml write
<module>
<web> <web-uri>SOME_DIR-web</web-uri> <context-root>/</context-root> </web> </module> so you will get:
APPLICATION-DIR/
META-INF/
Application.xml
SOME_DIR-web/
your_ejb_here
I use Ant for ejb building, but ANT have a bug in
ejbjar task
i've made a little patch to
"Ant.src/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java
"
if
(!className.startsWith("java.lang"))
{
// Translate periods into path separators, add .class to the // name, create the File object and add it to the Hashtable. // Parf's patch here
//
className = className.replace('.',
File.separatorChar);
className = className.replace('.', '/'); className += ".class"; So your build.xml will look like this
one:
<target name="mkbn"
depends="library">
<ejbjar descriptordir="${src}" srcdir="${build}" destdir="${ejb}" basenameterminator="." genericjarsuffix=".jar" flatdestdir="true" > <include name="**/*.ejb-jar.xml"/> </ejbjar> <antcall target="app"/> </target> <target name="app" description="Rebuild
Application.xml" >
<exec dir="${src}/JG" executable="perl"> <arg value="Make_Application_Xml.pl"/> </exec> </target> Make_Application_Xml.pl - simple perl script for
auto generating Application.xml:
Ant will search for all *.ejb-jar.xml's
and make them (only home,remote & bean libs)
To include other files make a application side
library:
something like this:
<target name="mall-ejblib"
depends="ejblib_init" >
<jar jarfile="${ejb}/ejblib-mall.jar" basedir="${build}"> <include name="META-INF/ejb-jar.xml" /> <!-- lookup --> <include name="unipoint/ejb/lookup/AlexEJBLookup.class" /> ......
</jar> </target> Btw there is another bug in Parser.jar that comes
with Ant,
when it locates string like this in xml declaration
it tryes to get dtd from given location
<!DOCTYPE ejb-jar PUBLIC '-//Sun
Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
I've decompiled and patched this too. - Speed
increase more than 20x.
Now it takes only 5 sec for me to compile, build
and install any beans/servlets with orion & Ant.
BTW: if u like to build a ear add a simple jar task
for war and jar task for ejb library
----- Original Message -----
|
- One Build.xml faisal
- Re:One Build.xml Porfiriev Sergey
- Re:One Build.xml theis . meggerle