File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant+Xdoclet: Generating taglib doc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant+Xdoclet: Generating taglib doc" Watch "Ant+Xdoclet: Generating taglib doc" New topic

Ant+Xdoclet: Generating taglib doc

Carl Tardif

Joined: Jul 04, 2006
Posts: 8

I'm wondering if any of you could help me figure out how to generate taglib documentation from a .tld file, using Xdoclet libraries in ANT.

So far, here's what I'm trying to do but this does not generate the taglib documentation and I fail to find any documentation/solution that would help me fix this.

I can't include my code here, giving me an error about evil javascripts, I tried to do as they suggest but to no avail.

So if anyone has an URL with a good documentation on using ANT + Xdoclet and/or good documentation on generating taglib documentation, that would greatly help me.

Thanks in advance !
Matt Harrah
Ranch Hand

Joined: Aug 05, 2006
Posts: 54
I would have thought that the documentation would have had what you need...

But from a 30,000 foot view:

  • Put the xdoclet @jsp.tag and @jsp.variable tags in your tag implementation classes
  • Define the webdoclet task in ant using a taskdef
  • In you Ant script, in some target, invoke the webdoclet task, and inside that use the jsptaglib subtask, telling it where to find your tag classes, etc., and where to spit out the .tld file

  • If you are using any of the JDK 5.0 features (such as generics, enums, static imports, etc) I recommend you use XDoclet2 rather than XDoclet - XDoclet out of the box does not work with JDK5 unless patched.

    XDoclet2 is still in beta but is pretty stable. The process is slightly different, but from the Ant side of things, so the differences aren't far reaching.
    [ September 07, 2006: Message edited by: Matt Harrah ]
    Carl Tardif

    Joined: Jul 04, 2006
    Posts: 8
    Thanks a lot that did help. I hadn't found the documentation about the jsptaglib subtask (in my mind it was not a subtask of webdoclet). I looked more attentively and found it.

    Plus your tips helped me solve the problem, which was less complicated than I had first thought ... which is often the case with every problem

    Thanks again.
    I agree. Here's the link:
    subject: Ant+Xdoclet: Generating taglib doc
    It's not a secret anymore!