Transition from xdoclet to xdoclet2
John Leonard <[email protected]> Tue, 23 Jun 2009 23:08:01 -0400
| Newsgroups | gmane.comp.java.xdoclet.user |
|---|---|
| Message-ID | <[email protected]> |
In xdoclet I use a template file and applied it to a set of Java files =
to produce desired output. Here is an example Ant build target adapted =
from the tutorial at:
http://www.liuzehua.com/xdoclet_tutorial/
<target name=3D"prepare">
<taskdef name=3D"xdoclet" classname=3D"xdoclet.DocletTask" =
classpathref=3D"xdoclet.class.path" />
</target>
=
<target name=3D"gensrc" depends=3D"prepare" description=3D"invoke XDoclet t=
o =
generate code">
<xdoclet destdir=3D"${xdoclet.gen-src.dir}" =
excludedtags=3D"@version,@author,@todo" force=3D"${xdoclet.force}" =
verbose=3D"true" >
<fileset dir=3D"${xdoclet.src.dir}">
<include name=3D"**/CLArguments.java"/>
</fileset>
<template destinationFile=3D"{0}Impl.java" =
templateFile=3D"${xdoclet.template.dir}/clarguments_impl.xdt" =
subTaskName=3D"Command line arguments" />
</xdoclet>
</target>
The code I am applying this to is written using Java 6 features like =
annotations, enums and generics. Xdoclet chokes when it tries to parse =
these elements. Two questions:
* =B7 Can Xdoclet2 perform this?
* =B7 If yes, can you show me Ant build code that accomplishes
this?
If I can, I want to work with Ant, rather than Maven.
Thank you,
John L.
---------------------------------------------------------------------------=
---