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

Javadoc link displays only documentation frame with no content

    • Javadoc Plugin 1.5

      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.

          [JENKINS-32619] Javadoc link displays only documentation frame with no content

          Gad Maor created issue -

          I guess the reason is the new content security policy:
          https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

          Quick and dirty solution:

          1. Go to Jenkins Script Console at https://my-jenkins-server/script
          2. Input

          System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")

          3. Hit Run button

          Better solution:

          Read the article above and apply it

          Christian Gnüchtel added a comment - I guess the reason is the new content security policy: https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy Quick and dirty solution: 1. Go to Jenkins Script Console at https://my-jenkins-server/script 2. Input System .setProperty( "hudson.model.DirectoryBrowserSupport.CSP" , "") 3. Hit Run button Better solution: Read the article above and apply it

          Gad Maor added a comment -

          Hi Christian and thanks very much for your reply.

          Something is very weird: I only managed to see the Javadoc after applying the specific fix for the Javadoc plugin( i.e., default-src 'none'; img-src 'self'; style-src 'self'; child-src 'self'; frame-src 'self' but NOT when completely disabling(unsetting) the header (i.e., System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") as you yourself suggested).

          Thanks again.

          Gad Maor added a comment - Hi Christian and thanks very much for your reply. Something is very weird: I only managed to see the Javadoc after applying the specific fix for the Javadoc plugin( i.e., default-src 'none'; img-src 'self'; style-src 'self'; child-src 'self'; frame-src 'self' but NOT when completely disabling(unsetting) the header (i.e., System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") as you yourself suggested). Thanks again.
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 4 (Web Link)" [ 14520 ]

          Jesse Glick added a comment -

          With the upcoming release you no longer need to disable security this way.

          Jesse Glick added a comment - With the upcoming release you no longer need to disable security this way.
          Jesse Glick made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Jesse Glick made changes -
          Link New: This issue is blocking SECURITY-95 [ SECURITY-95 ]

          Roman Pickl added a comment -

          I'm sorry to say that this does not seem to work without the
          JAVA_ARGS="$JAVA_ARGS -Dhudson.model.DirectoryBrowserSupport.CSP=\"default-src 'none'; img-src 'self'; style-src 'self'; child-src 'self'; frame-src 'self';\""
          fix even with the newest version of the plugin using jenkins 1.651.3

          Roman Pickl added a comment - I'm sorry to say that this does not seem to work without the JAVA_ARGS="$JAVA_ARGS -Dhudson.model.DirectoryBrowserSupport.CSP=\"default-src 'none'; img-src 'self'; style-src 'self'; child-src 'self'; frame-src 'self';\"" fix even with the newest version of the plugin using jenkins 1.651.3
          Roman Pickl made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 168275 ] New: JNJira + In-Review [ 186341 ]

            olivergondza Oliver Gondža
            bienstock Gad Maor
            Votes:
            7 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: