Ant buildfile + javadoc——包括javadoc底部的HTML



我试图修改与我正在使用的java库一起打包的ant构建文件,以便它将在页面的javadoc bottom部分包含链接。我有变量${author.name}${author.url}在ant build.xml文件中。我试图编辑的问题行是

下面的javadoc bottom="library ${project.name} by ${author.name}."
<!-- create the java reference of the library -->
<javadoc bottom="library ${project.name} by ${author.name}." 
    classpath="${classpath.local.location}/core.jar;{project.bin}" 
    destdir="${project.tmp}/${project.name}/reference" 
    verbose="false" 
    stylesheetfile="resources/stylesheet.css" 
    doctitle="Javadocs: ${project.name}" 
    public="true" version="false" 
    windowtitle="Javadocs: ${project.name}"      
>

现在,它打印如下内容:

Library myLibrary, by adilapapaya

我希望它包含到作者页面的链接。例如:

Library myLibrary, by adilapapaya.

或者

Library myLibrary, by adilapapaya, http://adilapapaya.com.

,但我不确定如何添加href到上面的ant构建文件。我试着

<javadoc bottom="library ${project.name} by <a href=${author.url}>${author.name}</a>."

但是我得到一个错误,说我不能这样做。基本上,我在寻找

的蚂蚁等价物
<a href=${author.url}>${author.name}</a>

您需要做的是添加一个嵌套的<bottom>元素,如下所示:

<javadoc ... >
  ...
  <bottom>
    <![CDATA[
      library ${project.name} by <a href="${author.url}">${author.name}</a>
    ]]>
  </bottom>
</javadoc>
参考:Ant javadoc任务,前3个例子展示了如何使用"bottom"元素

相关内容

  • 没有找到相关文章

最新更新