Struts + XDoclet (webdoclet) and integration with Eclipse

5
Share this on .. Tweet about this on Twitter0Share on LinkedIn0Share on Facebook0Share on Google+0Email this to someoneShare on TumblrBuffer this page

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:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project name="Blog" default="generateWeb" basedir="."&gt;
&lt;path id="xdoclet.lib.path"&gt;
	&lt;fileset dir="${lib.dir}" includes="*.jar"/&gt;
	&lt;fileset dir="${xdoclet.lib.dir}" includes="*.jar"/&gt;
&lt;/path&gt;
&lt;target name="generate-web"&gt;
  &lt;taskdef name="webdoclet"
           classname="xdoclet.modules.web.WebDocletTask"
           classpathref="xdoclet.lib.path"/&gt;
  &lt;!-- Generate servlet and JSP Tag "stuff" --&gt;
  &lt;webdoclet destdir="${gen.src.dir}" mergeDir="${merge.dir}"&gt;
    &lt;fileset dir="${src.dir}"&gt;
      &lt;include name="**/*Servlet.java" /&gt;
      &lt;include name="**/*Filter.java" /&gt;
      &lt;include name="**/*Listener.java" /&gt;
      &lt;include name="**/*Tag.java" /&gt;
      &lt;include name="**/*Action.java" /&gt;
      &lt;include name="**/*Form.java" /&gt;
    &lt;/fileset&gt;
    &lt;fileset dir="${gen.src.dir}"&gt;
      &lt;include name="**/*Form.java" /&gt;
    &lt;/fileset&gt;
    &lt;deploymentdescriptor
      destdir="${web.deployment.dir}"
      distributable="false" /&gt;
    &lt;jsptaglib
      filename="blogtags.tld"
      shortname="dateformat"
      destDir="${web.deployment.dir}" /&gt;
    &lt;strutsconfigxml
      version="1.1"
      destDir="${web.deployment.dir}" /&gt;
    &lt;strutsvalidationxml
      destDir="${web.deployment.dir}" /&gt;
  &lt;/webdoclet&gt;
&lt;/target&gt;
&lt;/project&gt;
Share this on .. Tweet about this on Twitter0Share on LinkedIn0Share on Facebook0Share on Google+0Email this to someoneShare on TumblrBuffer this page
1 2 3 4

About Author

AMIS employee

5 Comments

  1. Pingback: Credit Report Offers

  2. Pingback: Tripods For Less

  3. Pingback: Debt Consultation

  4. Hi,
    I have some problem, how to generate tiles-def.xml using Xdoclet1.2.
    Please give me any suggestion regarding this issue ASAP.