Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32619

Javadoc link displays only documentation frame with no content

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: javadoc-plugin
    • Labels:
    • Environment:
      Jenkins Version : Jenkins ver. 1.642.1
      OS : Red Hat Enterprise Linux 6.5

      Javadoc built from a freestyle project using maven javadoc:javadoc top-level target.
    • Similar Issues:

      Description

      When building a project in freestyle mode using Apache Maven 3.3.9 and creating the javadoc using the javadoc:javadoc top-level target, the Javadoc link appears on the project's dashboard, but when clicking it, only a blank Documentation frame appears without the content of the Javadoc.

      I should point out that the data IS there, since I opened the index.html file in my browser and it displayed perfectly.

      Attached is the result from clicking the Javadoc button and the Javadoc itself when launched via the index.html.

      Any help would be appreciated.

        Attachments

          Issue Links

            Activity

            Hide
            roidelapluie Julien Pivotto added a comment -

            This is a bug in the configuration. See https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

            There is nothing to do at the plugin level.

            The resolution of this bug is that as a workaround we open by default the non-framed page.

            Show
            roidelapluie Julien Pivotto added a comment - This is a bug in the configuration. See https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy There is nothing to do at the plugin level. The resolution of this bug is that as a workaround we open by default the non-framed page.
            Hide
            mesc mesc added a comment -

            well, I'm using the non-framed page workaround too

            But, it's still a pity not to have the framed javadoc working.

            I'm pleased so far with

            System.setProperty("hudson.model.DirectoryBrowserSupport.CSP",
             "default-src 'none'; img-src 'self'; style-src 'self'; child-src 'self'; frame-src 'self'; script-src 'unsafe-inline';")
            

            but tried to clear the hudson...CSP system property (see 1st comment by Christian) ... but this does not help, (framed) javadoc not loading.

            Show
            mesc mesc added a comment - well, I'm using the non-framed page workaround too But, it's still a pity not to have the framed javadoc working. I'm pleased so far with System .setProperty( "hudson.model.DirectoryBrowserSupport.CSP" ,   " default -src 'none' ; img-src 'self' ; style-src 'self' ; child-src 'self' ; frame-src 'self' ; script-src 'unsafe-inline' ;" ) but tried to clear the hudson...CSP system property (see 1st comment by Christian) ... but this does not help, (framed) javadoc not loading.
            Hide
            jglick Jesse Glick added a comment -

            It does not work when there is just one package, because the attempted fix looked only for overview-summary.html, which is generated only when there are multiple packages. A refined fix could look for index-all.html, or overview-tree.html, or allclasses-noframe.html, or some */package-summary.html.

            Show
            jglick Jesse Glick added a comment - It does not work when there is just one package, because the attempted fix looked only for overview-summary.html , which is generated only when there are multiple packages. A refined fix could look for index-all.html , or overview-tree.html , or allclasses-noframe.html , or some * /package-summary.html .
            Hide
            jglick Jesse Glick added a comment -

            One workaround: use the more general Publish HTML plugin, for example:

            publishHTML([reportDir: 'target/site/apidocs/', reportName: 'Javadoc', reportTitles: 'Javadoc', reportFiles: 'allclasses-noframe.html'])
            Show
            jglick Jesse Glick added a comment - One workaround: use the more general Publish HTML plugin, for example: publishHTML([reportDir: 'target/site/apidocs/' , reportName: 'Javadoc' , reportTitles: 'Javadoc' , reportFiles: 'allclasses-noframe.html' ])
            Hide
            olivergondza Oliver Gondža added a comment -

            To make this a bit more interesting, javadoc generated by Java 11 (likely Java9+) changes the behavior even further[1]:

            • No frames by default (can be turned on but the feature is expected to go away).
            • Dependency on javascript execution.
            • Redirect from index.html to single package-summary.html in case of single package project.
            • Framed navigation is replaced by JS-based search.
            • It even appears, the <noscript> does not kick in when javascript is disables through CSP.

            I went on exploring Jesse's suggestion of using different landing page on Javadoc 8 and 11 as well as using single/multi package projects. Both index-all.html and overview-tree.html appears to work (though subjectively, I am not sure this is the first page I would like to see) but allclasses-noframe.html is not generated on Java 11 (by default, at least).

            [1] https://bugs.openjdk.java.net/browse/JDK-8202961

            Show
            olivergondza Oliver Gondža added a comment - To make this a bit more interesting, javadoc generated by Java 11 (likely Java9+) changes the behavior even further [1] : No frames by default (can be turned on but the feature is expected to go away). Dependency on javascript execution. Redirect from index.html to single package-summary.html in case of single package project. Framed navigation is replaced by JS-based search. It even appears, the <noscript> does not kick in when javascript is disables through CSP. I went on exploring Jesse's suggestion of using different landing page on Javadoc 8 and 11 as well as using single/multi package projects. Both index-all.html and overview-tree.html appears to work (though subjectively, I am not sure this is the first page I would like to see) but allclasses-noframe.html is not generated on Java 11 (by default, at least). [1] https://bugs.openjdk.java.net/browse/JDK-8202961

              People

              • Assignee:
                Unassigned
                Reporter:
                bienstock Gad Maor
              • Votes:
                7 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: