Uploaded image for project: '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
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: None
    • 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).

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: