Take a look at samples/script/build.xml:
<target name="compile-ejbs" depends="ejbdoclet">
<!-- Compile EJBs -->
<javac srcdir="${java.dir};${generated.java.dir}"
destdir="${ejb.classes.dir}"
includes="test/ejb/*.java,test/interfaces/*.java,test/struts/*.java,test
/ejb/cmr/*.java,test/dao/*.java">
<classpath refid="project.class.path" />
</javac>
</target>
The trick is depends="ejbdoclet", so code is generated before you start
compiling. The other trick is to add the generated stuff to the list of
sources used in compilation, which is done using:
srcdir="${java.dir};${generated.java.dir}"
${generated.java.dir} point to where the generated stuff is placed.
PS: I'll probably turn it into an FSQ entry :-)
Ara.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-user-
> [EMAIL PROTECTED]] On Behalf Of [EMAIL PROTECTED]
> Sent: Friday, February 01, 2002 12:40 PM
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-user] Create method with data object as parameter
>
> Hi,
> I'm testing out Xdoclet at the moment and it works really great,
however I
> have trouble with the following: I want to pass a Xdoclet-generated
data
> object for my entity bean as the parameter for its ejbCreate method.
> However, when I include it using the fully qualified name (it's the
right
> name, I can see the data object generated after running my ant build
> script), the compiler gets angry, because it can't find the data
object;
> rightfully so in a way, because when compiling the source class it's
not
> there yet, because it's being generated by Xdoclet. In the samples I
saw
> some examples where such data object was passed to ejbCreate and it
> worked.
> Anyway, it would really help me a lot if someone could provide me with
an
> example of doing what I want including a sample of his/her ejbCreate
> method,
> the Xdoclet tags and the relevant part of the ant build script.
Thanks!!
>
> Bernhard Meyer-Willner
>
>
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user