Ignore minor errors using javadoc
<p>I'm trying to generate the documentation, using javadoc, from one or two downloaded jar files (with the source of course, after having extracted everything).</p>

<p>But using javadoc, even in an Ant file, I'm being prevented from generating this because of silly things, specifically "package XXX does not exist" and "cannot find symbol"... I just want javadoc to put the text of these things (external references) in the html docs, but to document all the .java files it finds...</p>

<p>NB for anyone interested this is the download page with the download files (containing source) from which I'm trying to generate the API documentation: <a href="http://logback.qos.ch/download.html" rel="noreferrer">http://logback.qos.ch/download.html</a></p>

<p>Following Mark Rotteveel's help, my Ant build file now looks like this:</p>

<pre><code>&lt;?xml version="1.0" ?&gt;
&lt;project name="document logback core" default="doc"&gt;
    &lt;target name="doc"&gt;
        &lt;mkdir dir="javadoc" /&gt;
        &lt;property name="excludedPackages"
            value="org.codehaus.*,javax.mail.*"/&gt;
        &lt;javadoc destdir="javadoc" sourcepath="src" packagenames="main.*" 
        excludepackagenames="${excludedPackages}"
        additionalparam="-Xdoclint:none" /&gt;
    &lt;/target&gt;
&lt;/project&gt;
</code></pre>

<p>... but it still gives errors 1) about packages not being found, including "org.codehaus.[xxx...]" and "javax.mail.[xxx...]" and 2) about symbols not being found (although this may go away if I can solve the missing packages errors).</p>

<p>NB the build is said to be successful, but I get complaints about no source files being found (where there are indeed commented .java files), and no html at all is generated under \javadoc.</p>

<p><strong><em>later, following Tony Pierce's success in generating these docs</em></strong></p>

<p>Installed Ant 1.9.6, changed path accordingly, checked to make sure this was the version being used... tried again.  Failed again.  This was the end of my output:</p>

<blockquote>
  <p>[javadoc]
  D:\Desktop\Downloads\logback-1.1.7.tar\logback-1.1.7\logback-core\src\test\java\ch\qos\logback\core\appender\ConsoleAppenderTest.java:32:
  error: package org.junit does not exist   <br>[javadoc] import static
  org.junit.Assert.assertEquals;   <br>[javadoc]_______________________^<br>
  <br>[javadoc] javadoc: error - No public or protected classes found to
  document.   <br>[javadoc] 1 error   <br>[javadoc] 100 warnings
  <br>
  <br>BUILD SUCCESSFUL Total time: 2 seconds</p>
</blockquote>

<p>It does create the javadoc folder... but this is empty.</p>

<p>NB about the above "package does not exist" error (there were many others): this one is particularly mystifying as I thought Ant somehow included junit by default (NB I am a complete newbie at Ant, just working through "Ant in Action").</p>

<p>But... with the Ant <code>javac</code> task you can set <code>includeAntRuntime="true"</code> ... according to this book that makes Ant's own <code>junit.jar</code> be included.  Unfortunately the <code>javadoc</code> task doesn't support this attribute.</p>

<p><strong><em>later still</em></strong></p>

<p>My thinking was a bit muddled on this, to be honest: the simplest way I have found to compile javadocs from third-party source jars is just by extracting and then using the command line, typically: </p>

<blockquote>
  <p>javadoc -d docs -Xmaxwarns 10 -Xmaxerrs 10 -Xdoclint:none -sourcepath
  . -subpackages ch.qos.logback.core</p>
</blockquote>

<p>... as for <code>javadoc</code> for one's own code this doesn't seem to be a problem in Gradle (I was only glimpsing at Ant, aware that the future is Gradle... and it's not particularly difficult to get to grips with the basics).</p>

<p>NB If you install the Gradle STS plugin for Eclipse, and then create a new project using Gradle STS wizard your build file contains the line </p>

<blockquote>
  <p>apply plugin: 'eclipse'</p>
</blockquote>

<p>... one of the effects of which is that by default the source as well as the executables for all your third-party dependencies will be downloaded under GRADLE_HOME during the build. Pretty good!</p>