Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      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

        Issue Links

          Activity

          Mark Thomas made changes -
          Workflow jira [ 12955657 ] Default workflow, editable Closed status [ 12992496 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 22:43:44 UTC 2015 [ 1428273824526 ]
          Mark Thomas made changes -
          Workflow jira [ 12718247 ] Default workflow, editable Closed status [ 12749568 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 09:17:21 UTC 2015 [ 1428225441187 ]
          Robert Scholte made changes -
          Field Original Value New Value
          Link This issue is related to MCHECKSTYLE-187 [ MCHECKSTYLE-187 ]
          Hide
          Benjamin Bentmann added a comment -

          The package.html files in src/main/javadoc do get copied to the build output directory, don't they?

          No, these files are only copied to the report output directory. If they were copied to the build output directory, they would end up in the JAR which is not intended.

          Show
          Benjamin Bentmann added a comment - The package.html files in src/main/javadoc do get copied to the build output directory, don't they? No, these files are only copied to the report output directory. If they were copied to the build output directory, they would end up in the JAR which is not intended.
          Hide
          Dennis Lundberg added a comment -

          I think that this is no longer an issue, because of the solution of MCHECKSTYLE-40. The build output directory is now included in the class path available to Checkstyle. The package.html files in src/main/javadoc do get copied to the build output directory, don't they?

          You can try using the latest 2.2-SNAPSHOT version of this plugin.

          Show
          Dennis Lundberg added a comment - I think that this is no longer an issue, because of the solution of MCHECKSTYLE-40 . The build output directory is now included in the class path available to Checkstyle. The package.html files in src/main/javadoc do get copied to the build output directory, don't they? You can try using the latest 2.2-SNAPSHOT version of this plugin.
          Hide
          Gregory Kick added a comment -

          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.

          Show
          Gregory Kick added a comment - 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 .
          Johan Vanbockryck created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Johan Vanbockryck
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Development