Maven Javadoc Plugin
  1. Maven Javadoc Plugin
  2. MJAVADOC-238

No timeout set for URLConnection which can cause build to get stuck

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Labels:
      None

      Description

      I encountered a release build getting stuck. Stack trace revealed that the culprit was an infinite default timeout in URLConnection.

      [INFO] at java.net.URL.openStream(URL.java:1007)
      [INFO] at org.apache.maven.plugin.javadoc.JavadocUtil.fetchURL(JavadocUtil.java:742)
      [INFO] at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addLinkArguments(AbstractJavadocMojo.java:2982)
      [INFO] at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addStandardDocletOptions(AbstractJavadocMojo.java:3667)
      [INFO] at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:1548)
      [INFO] at org.apache.maven.plugin.javadoc.JavadocJar.execute(JavadocJar.java:182)
      [INFO] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)

      The simple fix is to call setConnectTimeout and setReadTimeout with some sensible default value (jdk 1.5 methods, so might need to use reflection to preseve jdk 1.4 compatibility).

        Activity

        Hide
        Siveton Vincent added a comment -

        I added more tests in r797750. All sounds good.

        Show
        Siveton Vincent added a comment - I added more tests in r797750 . All sounds good.
        Hide
        Siveton Vincent added a comment -

        Fixed in r793854, snapshot deployed
        Please test it so I could close it.

        Show
        Siveton Vincent added a comment - Fixed in r793854 , snapshot deployed Please test it so I could close it.

          People

          • Assignee:
            Siveton Vincent
            Reporter:
            syvalta
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development