On Mon, 2004-11-29 at 19:24, Kevin Hinners wrote:
> I have a custom template that I am using to generate a class file. The ant
> task is:
> 
>   <target name="xdoclet" depends="prebuild">
>     <xdoclet destdir="${build.ejb}">
>       <template templateFile="delegate-template.xdt"
>                 destinationFile="${pkgPath}/${ejb}Delegate.java">
>       </template>
> 
>       <fileset dir="${build.ejb}">
>         <include name="**/*.java/"/>
>       </fileset>
>     </xdoclet>
>   </target>
> 
> When I modify the source file, triggering the xdoclet task to run, the
> results are appended to the existing destination file. I need this file to
> be overwritten/replaced instead.

I'm surprised if that's the case, normally it would indeed overwrite
it.  I think your problem could be that you have

<xdoclet destdir="${build.ejb}">
and
<fileset dir="${build.ejb}">

which means that the file that was generated on the previous run would
also be picked up as a source file for the subsequent generations. 
Depending on what your template is doing (and the fact that your
destinationFile doesn't contain a {0} placeholder means that it's
generating a single class from all the source fileset, including the
previous version of itself!) that could cause all sorts of weirdness...


Andrew.

> 
> I've searched the XDoclet documentation for an append="false" or
> overwrite="true" property for both the doclet task and template subtask to
> no avail. Does anyone know how to fix this problem?
> 
> Kevin Hinners
-- 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to