Darma, I believe that the ejbdoclet task doesn't support (or need) the sourcepath attribute. Your fileset already knows the location of the source files so specifying it again in the ejbdoclet task would be unnecessary. You can view the available attributes and sub-elements for the ejbdoclet task on the following page: http://xdoclet.sourceforge.net/xdoclet/ant/xdoclet/modules/ejb/EjbDocletTask.html So, try removing the sourcepath attribute from your ejbdoclet task and see if that gets you further along in your build. Hope this helps, Rod
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Darmasubramanian.G
Sent: Thu 3/10/2005 10:25 PM
To: [email protected]
Cc:
Subject: [Xdoclet-user] BUILD FAILED:The ejbdoclet task doesn't support
the sourcepath attribute
I am new to doclet. I am getting the following error.
D:\darma\XDoclet_example\code>ant
Buildfile: build.xml
init:
prepare:
[mkdir] Created dir: D:\darma\XDoclet_example\code\build
[mkdir] Created dir: D:\darma\XDoclet_example\code\build\ejb
[mkdir] Created dir:
D:\darma\XDoclet_example\code\build\ejb\META-INF
[mkdir] Created dir: D:\darma\XDoclet_example\code\build\j2ee
[mkdir] Created dir: D:\darma\XDoclet_example\code\dist
[mkdir] Created dir: D:\darma\XDoclet_example\code\gen-src
[mkdir] Created dir: D:\darma\XDoclet_example\code\gen-src\java
ejbdoclet:
BUILD FAILED
file:D:/darma/XDoclet_example/code/build.xml:56: The ejbdoclet task
doesn't support the sourcepath attribute.
Total time: 2 seconds
I am given below the build.xml.
<?xml version="1.0"?>
<project name="EJB Xbean" default="ejb-jar" basedir=".">
<!-- Init -->
<target name="init">
<property name="lib.dir" value="lib" />
<property name="xdoclet.jar.path"
value="D:/darma/xdoclet-1.2.2/lib/xdoclet-1.2.2.jar;D:/darma/xdoclet-1.2.2/lib/xdoclet-ejb-module-1.2.2.jar;D:/darma/xdoclet-1.2.2/lib/xjavadoc-1.1.jar;D:/darma/xdoclet-1.2.2/lib/xdoclet-bea-module-1.2.2.jar;D:/darma/xdoclet-1.2.2/lib/xdoclet-web-module-1.2.2.jar"
/>
<property name="log4j.jar.path"
value="D:/darma/xdoclet-1.2.2/lib/log4j.jar" />
<property name="ant.jar.path"
value="D:/bea/weblogic81/server/lib/ant/ant.jar" />
<property name="src.dir" value="src" />
<property name="generated.src.dir" value="gen-src" />
<property name="java.dir" value="." />
<property name="generated.java.dir"
value="${generated.src.dir}/java" />
<property name="config.dir" value="config" />
<property name="build.dir" value="build" />
<property name="dist.dir" value="dist" />
<property name="build.compiler" value="modern" />
<property name="name" value="receiver-xbean" />
</target>
<!-- Prepare -->
<target name="prepare" depends="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/ejb" />
<mkdir dir="${build.dir}/ejb/META-INF" />
<mkdir dir="${build.dir}/j2ee" />
<mkdir dir="${dist.dir}" />
<mkdir dir="${generated.src.dir}" />
<mkdir dir="${generated.java.dir}" />
</target>
<!-- Run EJBDoclet -->
<target name="ejbdoclet" depends="prepare">
<taskdef name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
classpath="${java.class.path};${xdoclet.jar.path};${log4j.jar.path};${ant.jar.path}"
/>
<ejbdoclet
sourcepath="${java.dir}"
destdir="${generated.java.dir}"
excludedtags="@version,@author"
ejbspec="2.0">
<fileset dir="${java.dir}">
<include name="**/ReceiverBean.java" />
</fileset>
<remoteinterface/>
<homeinterface/>
<deploymentdescriptor destdir="${build.dir}/ejb/META-INF"/>
<weblogic xmlencoding="UTF-8"
destdir="${build.dir}/ejb/META-INF" validatexml="true"/>
</ejbdoclet>
</target>
<!-- Compile -->
<target name="compile" depends="ejbdoclet">
<!-- Compile EJBs -->
<javac srcdir="${java.dir};${generated.java.dir}"
destdir="${build.dir}/ejb"
includes="examples/*.java">
</javac>
</target>
<!-- Create EJB-JAR file -->
<target name="ejb-jar" depends="compile">
<jar jarfile="${build.dir}/j2ee/${name}-ejb.jar"
basedir="${build.dir}/ejb" />
</target>
<!-- Clean everything -->
<target name="clean" depends="init">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${generated.src.dir}" />
</target>
</project>
------------------------
My directory structure is as follows..
D:\darma\XDoclet_example\code is the root directory
Here I have build.xml file & a directory named example.
The example directory contains a single file called ReceiverBean.java
I have enclosed ReceiverBean.java. It is in package examples...
Any help is highly appreciated.
Thanks and Regards,
DARMA
<<winmail.dat>>
