XDoclet (webdoclet) and Ant
Running XDoclet from Ant is clearly described in XDoclet in Action by Craig Walls and Norman Richards. They invoke the “generate-web” target from the main build.xml
with <ant antfile="build-webgen.xml" target="generate-web" />
, hence the relevant code is found in their build-webgen.xml
file:
<?xml version="1.0" encoding="UTF-8"?> <project name="Blog" default="generateWeb" basedir="."> <path id="xdoclet.lib.path"> <fileset dir="${lib.dir}" includes="*.jar"/> <fileset dir="${xdoclet.lib.dir}" includes="*.jar"/> </path> <target name="generate-web"> <taskdef name="webdoclet" classname="xdoclet.modules.web.WebDocletTask" classpathref="xdoclet.lib.path"/> <!-- Generate servlet and JSP Tag "stuff" --> <webdoclet destdir="${gen.src.dir}" mergeDir="${merge.dir}"> <fileset dir="${src.dir}"> <include name="**/*Servlet.java" /> <include name="**/*Filter.java" /> <include name="**/*Listener.java" /> <include name="**/*Tag.java" /> <include name="**/*Action.java" /> <include name="**/*Form.java" /> </fileset> <fileset dir="${gen.src.dir}"> <include name="**/*Form.java" /> </fileset> <deploymentdescriptor destdir="${web.deployment.dir}" distributable="false" /> <jsptaglib filename="blogtags.tld" shortname="dateformat" destDir="${web.deployment.dir}" /> <strutsconfigxml version="1.1" destDir="${web.deployment.dir}" /> <strutsvalidationxml destDir="${web.deployment.dir}" /> </webdoclet> </target> </project>
Nice tutorial about xdoclet and struts..
here is a tutorial about creating struts application with eclipse.
Hi,
I have some problem, how to generate tiles-def.xml using Xdoclet1.2.
Please give me any suggestion regarding this issue ASAP.