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 Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Labels:
      None
    • Number of attachments :
      0

      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
        Vincent Siveton added a comment -

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

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

        I added more tests in r797750. All sounds good.

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: