Sep
16
2004

Supressing XDoclet tags in Javadoc (from Ant)

If your project uses XDoclet and you’re sick of seeing those warnings like:

warning - @web.servlet is an unknown tag.

then what you’re after is the new Ant 1.6
<tag> element of the <javadoc> task. You can use this bad boy by embedding something like:

   <tag name="web.servlet" scope="all" enabled="false"/>

in your source. Be warned, though, if you’re trying to ignore a hyphen separated tag, (say web.servlet-mapping), you’re out of luck. It will interpret it without the hyphen. This is apparently a known bug with javadoc on JDK 1.4.

I’m thinking that this tag is just a wrapper of the -tag commandline arg (more info) of the javadoc executable, and that javadoc.exe internally has issues with parsing it’s own commandline. Those pesky embedded hyphens… ;-)

About the Author: Glen Smith

1 Comment + Add Comment

  • It’s not a bad idea to write your own custom tag handler; it’s not hard and gets rid of these errors.

    The irony, however, is that XDoclet went from using ‘:’ to ‘.’ as the seperator because under JDK 1.4.1, the ‘.’ syntax wasn’t highlighted as a missing tag. Then Sun changed it in 1.4.2… *shrug*

Leave a comment

Glen Smith

About Glen

Co-author Grails in Action