如何在Ant的Javadoc任务链接的第三方库 [英] How to link third party libraries in Ant's javadoc task

查看:158
本文介绍了如何在Ant的Javadoc任务链接的第三方库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个jar文件的形式使用第三方库的一个项目,我使用Ant构建项目的javadoc。我不能让蚂蚁通过javadoc任务时,链接到的第三方库的javadoc。

I have a project that uses a third party library in the form of a jar file and I am using Ant to build the project javadocs. I can't get Ant to link to the third-party library javadocs when using the javadoc task.

下面是Javadoc任务:

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>

从任务的输出说,猴包不存在:

The output from the task says 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]                                        ^

运行Ant任务创建所有的链接Sun网站正确,但还没到redhillconsulting网站。这两个网址,导致包列表文件和相应的路径(匹配软件包列表的内容)。

Running the ant task creates all the links to the Sun website correctly but not to the redhillconsulting site. Both URLs lead to a package-list file and appropriate paths (matching the package-list contents).

我如何配置&LT;&的javadoc GT; Ant任务生成链接到第三方网站

How do I configure the <javadoc> Ant task to generate the links to the third-party site?

注:猴jar文件在tools / lib目录。我还没有看到它指定的任何种类的类路径是一个选项,所以我还没有探索了途径,但是我已经尝试添加jar文件到文件集包括道路,这是没有任何好处。

推荐答案

的javadoc 标记接受一个嵌入的classpath 标签

The javadoc tag accepts an embedded classpath tag

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

这篇关于如何在Ant的Javadoc任务链接的第三方库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆