2

As per javadoc specifications, I placed a documentation file called package-info.html in the root directory of the relevant package. When I run Doxygen on that folder, however, the documentation in this file is not picked up. How do I tell Doxygen to use this file as the package documentation? I also tried package.html, the old specification, but that doesn't work., either

4
  • 1
    Actually, the current practice is to use a package-info.java instead of package.html. (No idea about Doxygen, though.) Commented Sep 10, 2011 at 12:57
  • Alright, I changed it and doxygen still doesn't do it right. I'll edit my post. Commented Sep 10, 2011 at 16:53
  • Just to make sure: It is package-info.java, not .html, and it has a different syntax. Commented Sep 10, 2011 at 16:58
  • That worked! Apparently javadoc still works with the old way, but Doxygen only works with the new way. Post as an answer and I'll accept you. Commented Sep 10, 2011 at 21:04

1 Answer 1

3

The new alternative way to provide documentation for a Java package is to use a file named package-info.java instead of package.html. (The file name is intentionally chosen not to be a valid class name.)

It has a different syntax:

/**
 * any javadoc comments (including tags)
 */
package name;

This is also the only way to provide package annotations (which are noted before the package keyword here, if any).

From your comments to the question, it looks like recent versions of Doxygen only understand this package-info.java, not the old package.html file.

I recall there being a module system proposed, which then would add a similar module-info.java file, but I don't find it now after a short googleing. (Maybe JSR 294?)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.