Ant/Maven: “javadoc: warning – Error fetching URL”

I recently set up my build server (Jenkins) to generate Javadocs for Ant builds. However, no matter what I do, I can’t get it to include links to external libraries. When I attempt to use an online link, Ant returns:

[javadoc] javadoc: warning - Error fetching URL:

When I use an offline link and reference a local copy of a package list, it gives no warnings, but doesn’t generate links either. This occurs for every library I attempt to link, not just Java SE. Here are the respective lines for links in my build.xml:

  • how to clone ssh remote repository using jgit and apache ant task?
  • What's the fastest way to get all build errors in a Java project?
  • Build from GIT Repository
  • How to invoke Ant in Jenkins pipeline job using groovy script?
  • Jenkins cannot find JUnit (Netbeans+ Git + Ant + JUnit + Jenkins)
  • Hudson/Jenkins PMD Configuration
  • <link offline="true" href="" packagelistLoc="javadoc/javase6/package-list" />


    <link href="" />

    It’s worth mentioning that the internet connection of the server doesn’t have a particularly unusual configuration. After a bit of research, I found that the warning I received is common when using a proxy, but I couldn’t find any cases where it was returned on a server with a direct connection.

    I’d also like to mention that I’ve verified that my offline package list is in the proper location and accessible via a relative path from the build file.

    Edit #1: This is apparently an issue on Maven as well, suggesting that the Javadoc tool itself is broken.

    Edit #2: It’s worth mentioning that I’m using JDK 1.6 update 45 to compile.

  • java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity
  • Managing Android project using Git and Eclipse
  • Can not recognize java command when using git bash
  • Only run unit tests which's respective source code has changed?
  • JGit - Using parameters with LogCommand
  • SVN to Git migration
  • 2 Solutions collect form web for “Ant/Maven: “javadoc: warning – Error fetching URL””

    <link offline="true" href=""
        packagelistLoc="javadoc/javase6/package-list" />

    should be:

    <link offline="true" href=""
        packagelistLoc="javadoc/javase6/" />

    packagelistLoc is a path to directory containing package-list file.

    It works fine, but for clarity, you need to download the package-list file from the Oracle website first, e.g., and save that file to the folder you specified.

    Git Baby is a git and github fan, let's start git clone.