I wish to generate local interfaces of a stateless session Bean with Ant and Xdoclet.

So, I have the following code in the Ejbdoclet task of Ant :

<target name="xdoclet-generate" depends="init">
      <taskdef
         name="ejbdoclet"
         classname="xdoclet.ejb.EjbDocletTask"
      >
         <classpath refid="xdoclet.path"/>
      </taskdef>
     
      <ejbdoclet
         sourcepath="${src.ejb.dir}"
         destdir="${build.generate.dir}"
         classpathref="base.path"
         excludedtags="@version,@author"
         ejbspec="${ejb.version}"
         mergedir="${src.resources.dir}/xdoclet"
         force="${xdoclet.force}"
      >
         <fileset dir="${src.ejb.dir}">
            <include name="**/*Bean.java"/>
         </fileset>
        
         <packageSubstitution packages="session" substituteWith="interfaces"/>
         <dataobject/>
         <localinterface/>
         <localhomeinterface/> 
         <deploymentdescriptor destdir="${build.dir}/META-INF"/>
         <jboss version="${jboss.version}"
            xmlencoding="UTF-8"
            typemapping="${type.mapping}"
            datasource="${datasource.name}"
            destdir="${build.dir}/META-INF"
            validateXml="false"
         />
     </ejbdoclet>
</target>

However, it doesn't run, ant it seems that Xdoclet always needs to have references on remote interfaces of my Calcul Bean, although I wanted that it forgets them.

This is the ejb-jar.xml after compilation :

 <session>
  <display-name>Calcul Bean</display-name>
  <ejb-name>calc/Calc</ejb-name>
  <home>calc.interfaces.CalcHome</home>
  <remote>calc.interfaces.Calc</remote>
  <ejb-class>calc.session.CalcBean</ejb-class>
  <session-type>Stateless</session-type>
  <transaction-type>Container</transaction-type>
 </session>
 
    In DOS console, execution of Ejbdoclet task doesn't generate any interfaces
    (neither remote, neither local)...
 
  xdoclet-generate:
[ejbdoclet] Generating Javadoc
[ejbdoclet] Javadoc execution
[ejbdoclet] Loading source file \  
                   C:\Ejb\CalcBean\src\main\ejb\calc\session\CalcBean.java...
[ejbdoclet] Constructing Javadoc information...
[ejbdoclet] Running <localHomeInterface/>
[ejbdoclet] Running <localInterface/>
[ejbdoclet] Running <dataobject/>
[ejbdoclet] Running <deploymentDescriptor/>
[ejbdoclet]   Generating EJB deployment descriptor.
[ejbdoclet] Running <jboss/>
[ejbdoclet]   Generating jboss.xml.
  compile:
    [mkdir] Created dir: C:\Ejb\CalcBean\build\classes
       BUILD FAILED
file:C:/Ejb/CalcBean2/build.xml:187: \
            srcdir "C:\Ejb\CalcBean\build\generate" does not exist!
  Total time: 4 seconds

Is there someone to explain me this strange behaviour ?

                                                           L'ourson



Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Testez le nouveau Yahoo! Mail

Reply via email to