I'm trying to get a system working via Ant to allow
multiple deployments of the same EJB across many different
modules. To do this I'd like to be able to include the bean
.java file in the set of files processed by the ejbdoclet
task, and define the relevant Ant properties for the @tags,
in each module's build file. The ejbdoclet task has a
standard configuration for all modules and is included via
XML entity references into the module build files.

My target looks like this:
===========================
        <target name="ejb-generate" description="Generate EJB
metadata from *Bean classes with XDoclet" >
                <taskdef name="ejbdoclet"
classname="xdoclet.ejb.EjbDocletTask"
classpath="${xdoclet_jar};${ejb2_jar};${log4j_jar}"/>
            <ejbdoclet
sourcepath="${basedir}/${ejb_src_dir};${basedir}/${src_dir}"
destdir="${generated_src_dir}"
                
classpath="${basedir}/build;${basedir}/tmp-build;${ant_jar};${xdoclet_jar};${jms_jar};${castor_serverjar};${ejb2_jar};${jboss_jdbc_jar};${log4j_jar};${xerces_serverjar}"
                        ejbspec="2.0" >
                        <!-- specify files to process -->
                        <fileset dir="${basedir}/${ejb_src_dir}" >
                            <include name="**/*Bean.java" />
                        </fileset>
                        <fileset refid="DuplicateEjbFileset" />

                        <entitypk pattern="{0}Key" />
                        <homeinterface pattern="{0}Home" />
                        <localhomeinterface pattern="{0}LocalHome" />
                        <localinterface pattern="{0}Local" />
                        <remoteinterface
pattern="{0}${ejbdoclet_remoteinterface}"/>
                    <dataobject />
                        <entitycmp />
                        <session />
                        <deploymentdescriptor xmlencoding="UTF-8"
destdir="${build_dir}/META-INF" mergedir="${basedir}/merge"
/>
                        <jboss version="2.4" xmlencoding="UTF-8" typemapping="MS
SQLSERVER 2000" destdir="${build_dir}/META-INF"/>

                </ejbdoclet>
==================

The idea is that for each module I can alter the contents
of the second <fileset> to add external bean .java files,
whilst keeping the definition of the ejbdoclet task the
same.

Unfortunately this doesn't work since generation of classes
(home/remote etc) seems to depend on the sourcepath
attribute of the ejbdoclet task. I can't modify this in the
same way that I can for the fileset (not with the same fine
granularity), but the task won't run without it. The result
is that, although I see my external bean files loaded by
the ejbdoclet task, it fails because the files are not in
the sourcepath specified (although they are in the
fileset).

So my question is: does sourcepath have to be obligatory
(either as an attribute or nested element) if there is a
fileset present? Isn't it kind of redundant? What am I
missing?

I'm using 1.1.1 by the way.

c

__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to