asolomon15 [EMAIL PROTECTED] wrote:
> I am having a problem  with the installation if xdoclet. I am
> not sure
> if I should place the xdoclet-1.2.1.jar in my aint lib
> directory or just
> place all of the xdoclet jar files in the ant lib directory.

You can use XDoclet from Ant without putting the XDoclet JARs on your
classpath or in ant/lib. Here is a snippet from a previous build.xml I
used:

    <path id="xdoclet.class.path.id">
        <pathelement location="${lib.dir}/xdoclet/*.jar"/>
        <pathelement location="${lib.dir}/utility/j2ee.jar"/>
    </path>

    <taskdef name="ejbdoclet"
             classname="xdoclet.modules.ejb.EjbDocletTask"
             classpathref="xdoclet.class.path.id"
    />

    <target name="ejbdoclet" 
            depends="init" 
            description="Generate EJB interfaces, homes and
descriptors">
        
        <ejbdoclet destdir="${gen.dir}"
                   excludedtags="@author,@todo"
                   addedtags="@xdoclet-generated at ${TODAY}"
                   ejbspec="2.0"
        >
            <fileset dir="${src.dir}">
                <include name="**/*EJB.java"/>
            </fileset>
            
            <remoteinterface pattern="{0}"/>
            <localinterface pattern="{0}Local"/>
            
            <homeinterface pattern="{0}Home"/>
            <localhomeinterface pattern="{0}LocalHome"/>
            
            <utilobject cachehomes="true" kind="physical"/>
            
            <deploymentdescriptor destdir="${gen.meta.dir}"
validateXML="true"/>
            <weblogic version="7.0"
                      destdir="${gen.meta.dir}"
                      validateXML="true"
                      datasource="${app.datasource}"
                      persistence="weblogic"
            />
        </ejbdoclet>
    </target>

I only use the EJB tasks, but I've changed it to pull in all of the
XDoclet JARs (and the j2ee.jar) so you can use any of the XDoclet tasks.
Note that there are a few properties from my build file and local paths
that you'll need to replace, but this is the basic setup and should get
you started. Also, all of the {0} are not Ant properties; they are for
XDoclet and represent the base name of the EJB minus the suffix (EJB in
my case, but you can change that if you call yours <Foo>Bean.java or
anything else).

Good luck!

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to