views:

50

answers:

2

I've playing with various java documenting techniques (different params on the javadoc command, doxygen, doclets, etc) but I can't seem to find what I am looking for...

I'd like to be able to generate a simple html page for each java source file from the javadoc comments. I don't need treeviews, frames, excessive decorations, etc.

Ideally, given source file A.java I would like A.html as the only generated file based on the javadoc comments.

I'm not opposed to writing something myself, but it really seems like I'd be reinventing the wheel here - is there something out there that has such functionality? Perhaps I missed some detail when playing with javadoc, doxygen & doclets? Bonus if any such fitting technology has an existing maven plugin.

An example listing of such files\folders that I do not want:

  • allclasses-frame.html
  • allclasses-noframe.html
  • constant-values.html
  • deprecated-list.html
  • help-doc.html
  • index-all.html
  • index.html
  • overview-tree.html
  • package-list
  • resources
  • stylesheet.css

TIA

A: 

You can simply use the javadoc tool and use the parameter -nonavbar. This will generate one html page for each class plus an index page. If you ignore the index page, it should be exactly what you are looking for.

tangens
I tried this again and got way more than 2 files per source. Such as:
javamonkey79
allclasses-frame.htmlallclasses-noframe.htmlconstant-values.htmldeprecated-list.htmlhelp-doc.htmlindex-all.htmlindex.htmloverview-tree.htmlpackage-listresourcesstylesheet.css
javamonkey79
Why don't you just ignore the extra stuff and just use the ones you need?
Neeme Praks
We have quite a few projects I am trying to set this up for and the documentation should be readable to non-developers as well.
javamonkey79
In other words, "ignoring the extra stuff" entails scripting up cleanup routines to get rid of all the clutter prior to uploading to the server - this seems messy to me.
javamonkey79
+1  A: 

javadoc has a bunch of options to not do certain things. Some (all) of these might fit your needs:

-nosince                          Do not include @since information
-notimestamp                      Do not include hidden time stamp
-nodeprecatedlist                 Do not generate deprecated list
-notree                           Do not generate class hierarchy
-noindex                          Do not generate index
-nohelp                           Do not generate help link
-nonavbar                         Do not generate navigation bar
Starkey
I turned on all of these and still got more than what I wanted.
javamonkey79