How to link third-party libraries in Ant javadoc task

I have a project that uses a third-party library as a jar file, and I use Ant to create javadocs for the project. I cannot get Ant to reference a third-party javadocs library when using the javadoc task.

Here is the javadoc task:

<javadoc excludepackagenames="" access="private" destdir="javadoc" author="true" version="true" use="true" windowtitle="title" useexternalfile="true"> <fileset dir="." defaultexcludes="yes"> <include name="*/src/com/**/*.java"/> </fileset> <link href="http://www.redhillconsulting.com.au/products/simian/javadoc/"/> <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/> </javadoc> 

As a result of the job, it is indicated that the simian package does not exist:

 [javadoc] C:\development\java\tools\src\com\cname\DuplicateCodeIdentifier.java:15: package au.com.redhillconsulting.simian does not exist [javadoc] import au.com.redhillconsulting.simian.Checker; [javadoc] ^ 

Running the Ant task creates all links to the Sun website, but not to the redhillconsulting website. Both URLs lead to the package list file and the corresponding paths (corresponding to the contents of the package list).

How to configure the <javadoc> Ant task to create links to a third-party site?

Note. The simian jar file is in the / lib tools. I did not see him indicate that any type of class path is an option, so I did not investigate this path, but I tried to add the jar file to the file set path, and that was not good.

+7
java javadoc ant
source share
2 answers

Javadoc tag accepts inline classpath tag

 <javadoc ...> <classpath> <fileset dir="${dir.lib}"> <include name="simian.jar"/> </fileset> </classpath> </javadoc> 
+13
source share

For * java files this for some reason does not work. I managed to solve this problem with sets of files, one of which includes my current project files, and the other includes additional package files. I just did not use the sourcepath attribute. Easy to add more files. However, I have not tried * jar files.

 <target name="doc" depends="init" description="generate documentation"> <javadoc destdir="${doc.dir}" access="private" author="yes" linksource="yes"> <fileset dir="./MyProject" includes="**/*.java" /> <fileset dir="./GuiPackage" includes="**/*.java" /> </javadoc> </target> 
0
source share

All Articles