You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ol...@rwg.de on 2000/09/22 09:56:00 UTC

ejbjar task (second approach)

Hello,

I'm able to build for each EJB a jar file (thanx to Conor agaib), but when I
tried to
build 1 general jar file I have the same starting problem: the
weblogic-ejb-jar.xml is not included in the generic jar file:

   ...
   [ejbjar] 1 deployment descriptors located.
   [ejbjar] building server.jar with 4 files
   [ejbjar] adding file 'META-INF/ejb-jar.xml'
   [ejbjar] adding file 'oli/ejb/server/hello/HelloBean.class'
   [ejbjar] adding file 'oli/ejb/server/hello/HelloHome.class'
   [ejbjar] adding file 'oli/ejb/server/hello/Hello.class'
   [ejbjar] Calling weblogic.ejbc for /tmp/classes/server-generic.jar
     [java] Calling weblogic.ejbc
     [java] ERROR: Error from ejbc: The JNDI name of bean hello.HelloHome was
not set
   ...

Last time I read the documentation not careful enough so I missed the naming
convention for single EJB generation. But for the generation of one single
deployment jar the standard names (ejb-jar.xml, weblogic-ejb-jar.xml) are used
(when I understand the documentation correct). Here my directory:

    Hello.java      HelloHome.java  ejb-jar.xml
    HelloBean.java  Makefile        weblogic-ejb-jar.xml

My build.xml file:

  <target name="compile.ejb" depends="compile.server">
    <ejbjar srcdir="${build.classes}"
            descriptordir="${descriptor.dir}"
            basejarname="server">
      <weblogic destdir="${build.classes}"

classpath="${classpath.weblogic}:${java.class.path}:${build.classes}:."
      />
      <include name="hello/*ejb-jar.xml"/>
      <exclude name="**/weblogic-ejb-jar.xml"/>
    </ejbjar>
  </target>

I tried various combination of include/exclues, renaming the xml files
- without success. Any ideas, what I've done wrong? Or does somebody
have a successful example? I use the 20-Sep-build - is this perhaps
the problem? (there's no newer one at the moment)

Oliver
--
Oliver Böhm
Tel 0711/2012-2734
mailto:oliver.boehm@rwg.de      http://www.rwg.de
mailto:boehm@ba-stuttgart.de    http://www.ba-stuttgart.de/~boehm