Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.1
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
Description
According to the documentation of the maven-javadoc-plugin, the Javadoc resources (like package.html) should be placed in src/main/javadoc. This will cause a checkstyle error for missing package.html files however when enabling the PackageHtml module, since this directory is not included in the checkstyle source path.
See also: http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html
I've looked into this and it's actually an issue with the PackageHtmlCheck. Rather than checking the fileset to see that it includes a corresponding package.html, it creates a File for package.html in the same directory as the java file and uses the exists() method. In order for this issue to be resolved, it would require either a fix in checkstyle or a new check implemented specifically for maven. In the end, I like to do things the maven way, but in this particular case, I'm not entirely sure that putting package.html files in a different directory even makes sense anyway. Why put just a small fraction of the javadocs in a different folder? It is a little odd to put resources like images there, but the package.html files just might be better off in src/main/java.