You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

javadoc.html 39 KiB

6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>Javadoc Task</title>
  20. </head>
  21. <body>
  22. <h2><a name="javadoc">Javadoc/<i>Javadoc2</i></a></h2>
  23. <h3>Description</h3>
  24. <p>Generates code documentation using the javadoc tool.</p>
  25. <p>The source directory will be recursively scanned for Java source files to process
  26. but only those matching the inclusion rules, and not matching the exclusions rules
  27. will be passed to the javadoc tool. This
  28. allows wildcards to be used to choose between package names, reducing verbosity
  29. and management costs over time. This task, however, has no notion of
  30. &quot;changed&quot; files, unlike the <a href="javac.html">javac</a> task. This means
  31. all packages will be processed each time this task is run. In general, however,
  32. this task is used much less frequently.</p>
  33. <p>NOTE: since javadoc calls System.exit(), javadoc cannot be run inside the
  34. same VM as Apache Ant without breaking functionality. For this reason, this task
  35. always forks the VM. This overhead is not significant since javadoc is normally a heavy
  36. application and will be called infrequently.</p>
  37. <p>NOTE: the packagelist attribute allows you to specify the list of packages to
  38. document outside of the Ant file. It's a much better practice to include everything
  39. inside the <code>build.xml</code> file. This option was added in order to make it easier to
  40. migrate from regular makefiles, where you would use this option of javadoc.
  41. The packages listed in packagelist are not checked, so the task performs even
  42. if some packages are missing or broken. Use this option if you wish to convert from
  43. an existing makefile. Once things are running you should then switch to the regular
  44. notation. </p>
  45. <p><i><b>DEPRECATION:</b> the javadoc2 task simply points to the javadoc task and it's
  46. there for back compatibility reasons. Since this task will be removed in future
  47. versions, you are strongly encouraged to use <a href="javadoc.html">javadoc</a>
  48. instead.</i></p>
  49. <p>In the table below, 1.2 means available if your current Java VM is
  50. a 1.2 VM (but not 1.3 or later), 1.4+ for any VM of at least version 1.4, otherwise
  51. any VM of at least version 1.2 is acceptable. JDKs &lt;1.4 are no longer supported.
  52. If you specify the <code>executable</code> attribute it is up to you
  53. to ensure that this command supports the attributes you wish to use.</p>
  54. <p><b>Note:</b><br>When generating the JavaDocs for classes which contains annotations
  55. you maybe get a <tt>java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl</tt>.
  56. This is due <a href="https://bugs.openjdk.java.net/browse/JDK-6442982" target="_blank">bug-6442982</a>. The cause is that JavaDoc cannot find the implementations of used annotations.
  57. The workaround is providing the jars with these implementations (like JAXBs <tt>@XmlType</tt>, ...)
  58. to &lt;javadoc&gt; using <tt>classpath</tt>, <tt>classpathref</tt> attributes or nested
  59. &lt;classpath&gt; element.</p>
  60. <p><b>Note:</b> many problems with running javadoc stem from command
  61. lines that have become too long - even though the error message
  62. doesn't give the slightest hint this may be the problem. If you
  63. encounter problems with the task, try to set
  64. the <code>useexternalfile</code> attribute to <code>true</code>
  65. first.</p>
  66. <p>If you use multiple ways to specify where javadoc should be looking
  67. for sources your result will be the union of all specified
  68. documentations. If you, e.g., specify a sourcepath attribute and
  69. also a nested packageset both pointing at the same directory your
  70. excludepackagenames attribute won't have any effect unless it agrees
  71. with the exclude patterns of the packageset (and vice versa).</p>
  72. <h3>Parameters</h3>
  73. <table border="1" cellpadding="2" cellspacing="0">
  74. <tr>
  75. <td valign="top"><b>Attribute</b></td>
  76. <td valign="top"><b>Description</b></td>
  77. <td align="center" valign="top"><b>Availability on Java</b></td>
  78. <td align="center" valign="top"><b>Required</b></td>
  79. </tr>
  80. <tr>
  81. <td valign="top">sourcepath</td>
  82. <td valign="top">Specify where to find source files</td>
  83. <td align="center" valign="top">all</td>
  84. <td align="center" rowspan="4">At least one of the four or nested
  85. <code>&lt;sourcepath&gt;</code>, <code>&lt;fileset&gt;</code>.
  86. <code>module</code> or <code>&lt;packageset&gt;</code></td>
  87. </tr>
  88. <tr>
  89. <td valign="top">sourcepathref</td>
  90. <td valign="top">Specify where to find source files by <a
  91. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  92. <td align="center" valign="top">all</td>
  93. </tr>
  94. <tr>
  95. <td valign="top">sourcefiles</td>
  96. <td valign="top">Comma separated list of source files -- see also
  97. the nested <code>source</code> element.</td>
  98. <td align="center" valign="top">all</td>
  99. </tr>
  100. <tr>
  101. <td valign="top">modulenames</td>
  102. <td valign="top">Comma separated list of module names -- see also
  103. the nested <code>module</code> element. <em>since Ant 1.9.14</em></td>
  104. <td align="center" valign="top">all</td>
  105. </tr>
  106. <tr>
  107. <td valign="top">destdir</td>
  108. <td valign="top">Destination directory for output files</td>
  109. <td align="center" valign="top">all</td>
  110. <td align="center" valign="top">Yes, unless a doclet has been specified.</td>
  111. </tr>
  112. <tr>
  113. <td valign="top">maxmemory</td>
  114. <td valign="top">Max amount of memory to allocate to the javadoc VM</td>
  115. <td align="center" valign="top">all</td>
  116. <td align="center" valign="top">No</td>
  117. </tr>
  118. <tr>
  119. <td valign="top">packagenames</td>
  120. <td valign="top">Comma separated list of package files (with terminating
  121. wildcard) -- see also the nested <code>package</code> element.</td>
  122. <td align="center" valign="top">all</td>
  123. <td align="center" valign="top">No</td>
  124. </tr>
  125. <tr>
  126. <td valign="top">packageList</td>
  127. <td valign="top">The name of a file containing the packages to process</td>
  128. <td align="center" valign="top">all</td>
  129. <td align="center" valign="top">No</td>
  130. </tr>
  131. <tr>
  132. <td valign="top">classpath</td>
  133. <td valign="top">Specify where to find user class files</td>
  134. <td align="center" valign="top">all</td>
  135. <td align="center" valign="top">No</td>
  136. </tr>
  137. <tr>
  138. <td valign="top">Bootclasspath</td>
  139. <td valign="top">Override location of class files loaded by the bootstrap
  140. class loader</td>
  141. <td align="center" valign="top">all</td>
  142. <td align="center" valign="top">No</td>
  143. </tr>
  144. <tr>
  145. <td valign="top">classpathref</td>
  146. <td valign="top">Specify where to find user class files by <a
  147. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  148. <td align="center" valign="top">all</td>
  149. <td align="center" valign="top">No</td>
  150. </tr>
  151. <tr>
  152. <td valign="top">bootclasspathref</td>
  153. <td valign="top">Override location of class files loaded by the
  154. bootstrap class loader by <a href="../using.html#references">reference</a> to a
  155. PATH defined elsewhere.</td>
  156. <td align="center" valign="top">all</td>
  157. <td align="center" valign="top">No</td>
  158. </tr>
  159. <tr>
  160. <td valign="top">Extdirs</td>
  161. <td valign="top">Override location of installed extensions</td>
  162. <td align="center" valign="top">all</td>
  163. <td align="center" valign="top">No</td>
  164. </tr>
  165. <tr>
  166. <td valign="top">Overview</td>
  167. <td valign="top">Read overview documentation from HTML file</td>
  168. <td align="center" valign="top">all</td>
  169. <td align="center" valign="top">No</td>
  170. </tr>
  171. <tr>
  172. <td valign="top">access</td>
  173. <td valign="top">Access mode: one of <code>public</code>, <code>protected</code>,
  174. <code>package</code>, or <code>private</code></td>
  175. <td align="center" valign="top">all</td>
  176. <td align="center" valign="top">No (default <code>protected</code>)</td>
  177. </tr>
  178. <tr>
  179. <td valign="top">Public</td>
  180. <td valign="top">Show only public classes and members</td>
  181. <td align="center" valign="top">all</td>
  182. <td align="center" valign="top">No</td>
  183. </tr>
  184. <tr>
  185. <td valign="top">Protected</td>
  186. <td valign="top">Show protected/public classes and members (default)</td>
  187. <td align="center" valign="top">all</td>
  188. <td align="center" valign="top">No</td>
  189. </tr>
  190. <tr>
  191. <td valign="top">Package</td>
  192. <td valign="top">Show package/protected/public classes and members</td>
  193. <td align="center" valign="top">all</td>
  194. <td align="center" valign="top">No</td>
  195. </tr>
  196. <tr>
  197. <td valign="top">Private</td>
  198. <td valign="top">Show all classes and members</td>
  199. <td align="center" valign="top">all</td>
  200. <td align="center" valign="top">No</td>
  201. </tr>
  202. <tr>
  203. <td valign="top">Old</td>
  204. <td valign="top">Generate output using JDK 1.1 emulating
  205. doclet.<br>
  206. <b>Note:</b> as of Ant 1.8.0 this attribute doesn't have any
  207. effect since the javadoc of Java 1.4 (required by Ant 1.8.0)
  208. doesn't support the -1.1 switch anymore.</td>
  209. <td align="center" valign="top">1.2</td>
  210. <td align="center" valign="top">No</td>
  211. </tr>
  212. <tr>
  213. <td valign="top">Verbose</td>
  214. <td valign="top">Output messages about what Javadoc is doing</td>
  215. <td align="center" valign="top">all</td>
  216. <td align="center" valign="top">No</td>
  217. </tr>
  218. <tr>
  219. <td valign="top">Locale</td>
  220. <td valign="top">Locale to be used, e.g. en_US or en_US_WIN</td>
  221. <td align="center" valign="top">all</td>
  222. <td align="center" valign="top">No</td>
  223. </tr>
  224. <tr>
  225. <td valign="top">Encoding</td>
  226. <td valign="top">Source file encoding name</td>
  227. <td align="center" valign="top">all</td>
  228. <td align="center" valign="top">No</td>
  229. </tr>
  230. <tr>
  231. <td valign="top">Version</td>
  232. <td valign="top">Include @version paragraphs</td>
  233. <td align="center" valign="top">all</td>
  234. <td align="center" valign="top">No</td>
  235. </tr>
  236. <tr>
  237. <td valign="top">Use</td>
  238. <td valign="top">Create class and package usage pages</td>
  239. <td align="center" valign="top">all</td>
  240. <td align="center" valign="top">No</td>
  241. </tr>
  242. <tr>
  243. <td valign="top">Author</td>
  244. <td valign="top">Include @author paragraphs</td>
  245. <td align="center" valign="top">all</td>
  246. <td align="center" valign="top">No</td>
  247. </tr>
  248. <tr>
  249. <td valign="top">Splitindex</td>
  250. <td valign="top">Split index into one file per letter</td>
  251. <td align="center" valign="top">all</td>
  252. <td align="center" valign="top">No</td>
  253. </tr>
  254. <tr>
  255. <td valign="top">Windowtitle</td>
  256. <td valign="top">Browser window title for the documentation (text)</td>
  257. <td align="center" valign="top">all</td>
  258. <td align="center" valign="top">No</td>
  259. </tr>
  260. <tr>
  261. <td valign="top">Doctitle</td>
  262. <td valign="top">Include title for the package index(first) page (html-code)</td>
  263. <td align="center" valign="top">all</td>
  264. <td align="center" valign="top">No</td>
  265. </tr>
  266. <tr>
  267. <td valign="top">Header</td>
  268. <td valign="top">Include header text for each page (html-code)</td>
  269. <td align="center" valign="top">all</td>
  270. <td align="center" valign="top">No</td>
  271. </tr>
  272. <tr>
  273. <td valign="top">Footer</td>
  274. <td valign="top">Include footer text for each page (html-code)</td>
  275. <td align="center" valign="top">all</td>
  276. <td align="center" valign="top">No</td>
  277. </tr>
  278. <tr>
  279. <td valign="top">bottom</td>
  280. <td valign="top">Include bottom text for each page (html-code)</td>
  281. <td align="center" valign="top">all</td>
  282. <td align="center" valign="top">No</td>
  283. </tr>
  284. <tr>
  285. <td valign="top">link</td>
  286. <td valign="top">Create links to javadoc output at the given URL
  287. -- see also the nested <code>link</code> element.</td>
  288. <td align="center" valign="top">all</td>
  289. <td align="center" valign="top">No</td>
  290. </tr>
  291. <tr>
  292. <td valign="top">linkoffline</td>
  293. <td valign="top">Link to docs at <code>&lt;url&gt;</code> using package list at
  294. <code>&lt;url2&gt;</code> - separate the URLs by using a space character -- see
  295. also the nested <code>link</code> element.</td>
  296. <td align="center" valign="top">all</td>
  297. <td align="center" valign="top">No</td>
  298. </tr>
  299. <tr>
  300. <td valign="top">group</td>
  301. <td valign="top">Group specified packages together in overview
  302. page. The format is as described <a
  303. href="#groupattribute">below</a> -- see also the nested
  304. <code>group</code> element.</td>
  305. <td align="center" valign="top">all</td>
  306. <td align="center" valign="top">No</td>
  307. </tr>
  308. <tr>
  309. <td valign="top">nodeprecated</td>
  310. <td valign="top">Do not include @deprecated information</td>
  311. <td align="center" valign="top">all</td>
  312. <td align="center" valign="top">No</td>
  313. </tr>
  314. <tr>
  315. <td valign="top">nodeprecatedlist</td>
  316. <td valign="top">Do not generate deprecated list</td>
  317. <td align="center" valign="top">all</td>
  318. <td align="center" valign="top">No</td>
  319. </tr>
  320. <tr>
  321. <td valign="top">notree</td>
  322. <td valign="top">Do not generate class hierarchy</td>
  323. <td align="center" valign="top">all</td>
  324. <td align="center" valign="top">No</td>
  325. </tr>
  326. <tr>
  327. <td valign="top">noindex</td>
  328. <td valign="top">Do not generate index</td>
  329. <td align="center" valign="top">all</td>
  330. <td align="center" valign="top">No</td>
  331. </tr>
  332. <tr>
  333. <td valign="top">nohelp</td>
  334. <td valign="top">Do not generate help link</td>
  335. <td align="center" valign="top">all</td>
  336. <td align="center" valign="top">No</td>
  337. </tr>
  338. <tr>
  339. <td valign="top">nonavbar</td>
  340. <td valign="top">Do not generate navigation bar</td>
  341. <td align="center" valign="top">all</td>
  342. <td align="center" valign="top">No</td>
  343. </tr>
  344. <tr>
  345. <td valign="top">serialwarn</td>
  346. <td valign="top">Generate warning about @serial tag</td>
  347. <td align="center" valign="top">all</td>
  348. <td align="center" valign="top">No</td>
  349. </tr>
  350. <tr>
  351. <td valign="top">helpfile</td>
  352. <td valign="top">Specifies the HTML help file to use</td>
  353. <td align="center" valign="top">all</td>
  354. <td align="center" valign="top">No</td>
  355. </tr>
  356. <tr>
  357. <td valign="top">stylesheetfile</td>
  358. <td valign="top">Specifies the CSS stylesheet to use</td>
  359. <td align="center" valign="top">all</td>
  360. <td align="center" valign="top">No</td>
  361. </tr>
  362. <tr>
  363. <td valign="top">charset</td>
  364. <td valign="top">Charset for cross-platform viewing of generated
  365. documentation</td>
  366. <td align="center" valign="top">all</td>
  367. <td align="center" valign="top">No</td>
  368. </tr>
  369. <tr>
  370. <td valign="top">docencoding</td>
  371. <td valign="top">Output file encoding name</td>
  372. <td align="center" valign="top">all</td>
  373. <td align="center" valign="top">No</td>
  374. </tr>
  375. <tr>
  376. <td valign="top">doclet</td>
  377. <td valign="top">Specifies the class file that starts the doclet
  378. used in generating the documentation -- see also the nested
  379. <code>doclet</code> element.</td>
  380. <td align="center" valign="top">all</td>
  381. <td align="center" valign="top">No</td>
  382. </tr>
  383. <tr>
  384. <td valign="top">docletpath</td>
  385. <td valign="top">Specifies the path to the doclet class file that is specified with the -doclet option.</td>
  386. <td align="center" valign="top">all</td>
  387. <td align="center" valign="top">No</td>
  388. </tr>
  389. <tr>
  390. <td valign="top">docletpathref</td>
  391. <td valign="top">Specifies the path to the doclet class file that
  392. is specified with the -doclet option by <a
  393. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  394. <td align="center" valign="top">all</td>
  395. <td align="center" valign="top">No</td>
  396. </tr>
  397. <tr>
  398. <td valign="top">additionalparam</td>
  399. <td valign="top">Lets you add additional parameters to the javadoc
  400. command line. Useful for doclets. Parameters containing spaces
  401. need to be quoted using &amp;quot; -- see also the nested
  402. <code>arg</code> element.</td>
  403. <td align="center" valign="top">all</td>
  404. <td align="center" valign="top">No</td>
  405. </tr>
  406. <tr>
  407. <td valign="top">failonerror</td>
  408. <td valign="top">Stop the buildprocess if the command exits with a
  409. returncode other than 0.</td>
  410. <td align="center" valign="top">all</td>
  411. <td align="center" valign="top">No</td>
  412. </tr>
  413. <tr>
  414. <td valign="top">failonwarning</td>
  415. <td valign="top">Stop the buildprocess if a warning is emitted -
  416. i.e. if javadoc's output contains the word "warning". <em>since
  417. Ant 1.9.4</em></td>
  418. <td align="center" valign="top">all</td>
  419. <td align="center" valign="top">No</td>
  420. </tr>
  421. <tr>
  422. <td valign="top">excludepackagenames</td>
  423. <td valign="top">comma separated list of packages you don't want
  424. docs for -- see also the nested <code>excludepackage</code> element.</td>
  425. <td align="center" valign="top">all</td>
  426. <td valign="top" align="center">No</td>
  427. </tr>
  428. <tr>
  429. <td valign="top">defaultexcludes</td>
  430. <td valign="top">indicates whether default excludes should be used
  431. (<code>yes</code> | <code>no</code>); default excludes are used when omitted.</td>
  432. <td align="center" valign="top">all</td>
  433. <td valign="top" align="center">No</td>
  434. </tr>
  435. <tr>
  436. <td valign="top">useexternalfile</td>
  437. <td valign="top">indicates whether the sourcefile name specified
  438. in srcfiles or as nested source elements should be written to a
  439. temporary file to make the command line shorter. Also applies to
  440. the package names specified via the packagenames attribute or
  441. nested package elements. <em>Since Ant 1.7.0</em>, also applies
  442. to all the other command line options.
  443. (<code>yes</code> | <code>no</code>). Default is no.</td>
  444. <td align="center" valign="top">all</td>
  445. <td valign="top" align="center">No</td>
  446. </tr>
  447. <tr>
  448. <td valign="top">source</td>
  449. <td valign="top">Necessary to enable javadoc to handle assertions
  450. present in J2SE v 1.4 source code. Set this to &quot;1.4&quot; to
  451. documents code that compiles using <code>&quot;javac -source
  452. 1.4&quot;</code>.<br>
  453. A default value for this attribute can be provided using the magic
  454. <a
  455. href="../javacprops.html#source"><code>ant.build.javac.source</code></a>
  456. property.</td>
  457. <td align="center" valign="top">1.4+</td>
  458. <td align="center" valign="top">No</td>
  459. </tr>
  460. <tr>
  461. <td valign="top">linksource</td>
  462. <td valign="top">Generate hyperlinks to source files.
  463. <em>since Ant 1.6</em>.
  464. (<code>yes</code> | <code>no</code>). Default is no.</td>
  465. <td align="center" valign="top">1.4+</td>
  466. <td align="center" valign="top">No</td>
  467. </tr>
  468. <tr>
  469. <td valign="top">breakiterator</td>
  470. <td valign="top">Use the new breakiterator algorithm.
  471. <em>since Ant 1.6</em>.
  472. (<code>yes</code> | <code>no</code>). Default is no.</td>
  473. <td align="center" valign="top">1.4+</td>
  474. <td align="center" valign="top">No</td>
  475. </tr>
  476. <tr>
  477. <td valign="top">noqualifier</td>
  478. <td valign="top">Enables the <code>-noqualifier</code> argument -
  479. must be <code>all</code> or a colon separated list of packages.
  480. <em>since Ant 1.6</em>.</td>
  481. <td align="center" valign="top">1.4+</td>
  482. <td align="center" valign="top">No</td>
  483. </tr>
  484. <tr>
  485. <td valign="top">includenosourcepackages</td>
  486. <td valign="top">If set to true, packages that don't contain Java
  487. source but a package.html will get documented as well.
  488. <em>since Ant 1.6.3</em>.</td>
  489. <td align="center" valign="top">all</td>
  490. <td align="center" valign="top">No (default is <code>false</code>)</td>
  491. </tr>
  492. <tr>
  493. <td valign="top">executable</td>
  494. <td valign="top">Specify a particular <code>javadoc</code> executable
  495. to use in place of the default binary (found in the same JDK as Ant is running in).
  496. <em>since Ant 1.6.3</em>.</td>
  497. <td align="center" valign="top">all</td>
  498. <td align="center" valign="top">No</td>
  499. </tr>
  500. <tr>
  501. <td valign="top">docfilessubdirs</td>
  502. <td valign="top">Enables deep-copying of <code>doc-files</code>
  503. subdirectories. Defaults to false. <em>since Ant 1.8.0</em>.</td>
  504. <td align="center" valign="top">1.4</td>
  505. <td align="center" valign="top">No</td>
  506. </tr>
  507. <tr>
  508. <td valign="top">excludedocfilessubdir</td>
  509. <td valign="top">Colon-separated list of <code>doc-files</code>'
  510. subdirectories to exclude if <code>docfilessubdirs</code> is
  511. true. <em>since Ant 1.8.0</em>.</td>
  512. <td align="center" valign="top">1.4</td>
  513. <td align="center" valign="top">No</td>
  514. </tr>
  515. <tr>
  516. <td valign="top">postProcessGeneratedJavadocs</td>
  517. <td valign="top">Whether to post-process the generated javadocs in
  518. order to mitigate CVE-2013-1571. Defaults to true. <em>Since Ant
  519. 1.9.2</em><br>
  520. There is a frame injection attack possible in javadocs generated by Oracle
  521. JDKs prior to Java7 Update 25 (<a href="http://www.oracle.com/technetwork/java/javase/7u25-relnotes-1955741.html#jpi-upt" target="_blank">details</a>).
  522. When this flag is set to true, Ant will check whether the docs are vulnerable
  523. and will try to fix them.
  524. </td>
  525. <td align="center" valign="top">1.4</td>
  526. <td align="center" valign="top">No</td>
  527. </tr>
  528. <tr>
  529. <td valign="top">modulesourcepath</td>
  530. <td valign="top">Specify where to find module source files
  531. <em>since Ant 1.9.14</em></td>
  532. <td align="center" valign="top">all</td>
  533. <td align="center" valign="top">No</td>
  534. </tr>
  535. <tr>
  536. <td valign="top">modulesourcepathref</td>
  537. <td valign="top">Specify where to find module source files by <a
  538. href="../using.html#references">reference</a> to a PATH defined elsewhere.
  539. <em>since Ant 1.9.14</em></td>
  540. <td align="center" valign="top">all</td>
  541. <td align="center" valign="top">No</td>
  542. </tr>
  543. <tr>
  544. <td valign="top">modulepath</td>
  545. <td valign="top">Specify where to find module files
  546. <em>since Ant 1.9.14</em></td>
  547. <td align="center" valign="top">all</td>
  548. <td align="center" valign="top">No</td>
  549. </tr>
  550. <tr>
  551. <td valign="top">modulepathref</td>
  552. <td valign="top">Specify where to find module files by <a
  553. href="../using.html#references">reference</a> to a PATH defined elsewhere.
  554. <em>since Ant 1.9.14</em></td>
  555. <td align="center" valign="top">all</td>
  556. <td align="center" valign="top">No</td>
  557. </tr>
  558. </table>
  559. <h4><a name="groupattribute">Format of the group attribute</a></h4>
  560. <p>The arguments are comma-delimited. Each single argument is 2
  561. space-delimited strings, where the first one is the group's title and
  562. the second one a colon delimited list of packages.</p>
  563. <p>If you need to specify more than one group, or a group whose title
  564. contains a comma or a space character, using <a
  565. href="#groupelement">nested group elements</a> is highly
  566. recommended.</p>
  567. <p>E.g.:</p>
  568. <pre> group=&quot;XSLT_Packages org.apache.xalan.xslt*,XPath_Packages org.apache.xalan.xpath*&quot;</pre>
  569. <h3>Parameters specified as nested elements</h3>
  570. <h4>packageset</h4>
  571. <p>A <a href="../Types/dirset.html">DirSet</a>. All matched
  572. directories that contain Java source files will be passed to javadoc
  573. as package names. Package names are created from the directory names
  574. by translating the directory separator into dots. Ant assumes the
  575. base directory of the packageset points to the root of a package
  576. hierarchy.</p>
  577. <p>The <code>packagenames</code>, <code>excludepackagenames</code> and
  578. <code>defaultexcludes</code> attributes of the task have no effect on
  579. the nested <code>&lt;packageset&gt;</code> elements.</p>
  580. <h4>fileset</h4>
  581. <p>A <a href="../Types/fileset.html">FileSet</a>. All matched
  582. files will be passed to javadoc as source files. Ant will
  583. automatically add the include pattern <code>**/*.java</code> (and
  584. <code>**/package.html</code> if includenosourcepackages is true) to
  585. these filesets.</p>
  586. <p>Nested filesets can be used to document sources that are in the
  587. default package or if you want to exclude certain files from
  588. documentation. If you want to document all source files and don't use
  589. the default package, packagesets should be used instead as this
  590. increases javadocs performance.</p>
  591. <p>The <code>packagenames</code>, <code>excludepackagenames</code> and
  592. <code>defaultexcludes</code> attributes of the task have no effect on
  593. the nested <code>&lt;fileset&gt;</code> elements.</p>
  594. <h4>sourcefiles</h4>
  595. <p>A container for arbitrary file system based <a
  596. href="../Types/resources.html#collection">resource
  597. collections</a>. All files contained in any of the nested collections
  598. (this includes nested filesets, filelists or paths) will be passed to
  599. javadoc as source files.</p>
  600. <h4>package</h4>
  601. <p>Same as one entry in the list given by <code>packagenames</code>.</p>
  602. <h5>Parameters</h5>
  603. <table width="90%" border="1" cellpadding="2" cellspacing="0">
  604. <tr>
  605. <td valign="top"><b>Attribute</b></td>
  606. <td valign="top"><b>Description</b></td>
  607. <td align="center" valign="top"><b>Required</b></td>
  608. </tr>
  609. <tr>
  610. <td valign="top">name</td>
  611. <td valign="top">The package name (may be a wildcard)</td>
  612. <td align="center" valign="top">Yes</td>
  613. </tr>
  614. </table>
  615. <h4>excludepackage</h4>
  616. <p>Same as one entry in the list given by <code>excludepackagenames</code>.</p>
  617. <h5>Parameters</h5>
  618. Same as for <code>package</code>.
  619. <h4>module</h4>
  620. <p><em>since Ant 1.9.14</em></p>
  621. <p>Same as one entry in the list given by <code>modulenames</code>.</p>
  622. <h5>Parameters</h5>
  623. <table width="90%" border="1" cellpadding="2" cellspacing="0">
  624. <tr>
  625. <td valign="top"><b>Attribute</b></td>
  626. <td valign="top"><b>Description</b></td>
  627. <td align="center" valign="top"><b>Required</b></td>
  628. </tr>
  629. <tr>
  630. <td valign="top">name</td>
  631. <td valign="top">The module name</td>
  632. <td align="center" valign="top">Yes</td>
  633. </tr>
  634. </table>
  635. <h4>source</h4>
  636. <p>Same as one entry in the list given by <code>sourcefiles</code>.</p>
  637. <h5>Parameters</h5>
  638. <table width="90%" border="1" cellpadding="2" cellspacing="0">
  639. <tr>
  640. <td valign="top"><b>Attribute</b></td>
  641. <td valign="top"><b>Description</b></td>
  642. <td align="center" valign="top"><b>Required</b></td>
  643. </tr>
  644. <tr>
  645. <td valign="top">file</td>
  646. <td valign="top">The source file to document</td>
  647. <td align="center" valign="top">Yes</td>
  648. </tr>
  649. </table>
  650. <h4>doctitle</h4>
  651. <p>Same as the <code>doctitle</code> attribute, but you can nest text
  652. inside the element this way.</p>
  653. <p>If the nested text contains line breaks, you must use the
  654. useexternalfile attribute and set it to true.</p>
  655. <h4>header</h4>
  656. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  657. <h4>footer</h4>
  658. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  659. <h4>bottom</h4>
  660. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  661. <h4>link</h4>
  662. <p>Create link to javadoc output at the given URL. This performs the
  663. same role as the link and linkoffline attributes. You can use either
  664. syntax (or both at once), but with the nested elements you can easily
  665. specify multiple occurrences of the arguments.</p>
  666. <h5>Parameters</h5>
  667. <table width="90%" border="1" cellpadding="2" cellspacing="0">
  668. <tr>
  669. <td valign="top"><b>Attribute</b></td>
  670. <td valign="top"><b>Description</b></td>
  671. <td align="center" valign="top"><b>Required</b></td>
  672. </tr>
  673. <tr>
  674. <td valign="top">href</td>
  675. <td valign="top">The URL for the external documentation you wish
  676. to link to. This can be an absolute URL, or a relative file
  677. name.</td>
  678. <td align="center" valign="top">Yes</td>
  679. </tr>
  680. <tr>
  681. <td valign="top">offline</td>
  682. <td valign="top">True if this link is not available online at the time of
  683. generating the documentation</td>
  684. <td align="center" valign="top">No</td>
  685. </tr>
  686. <tr>
  687. <td valign="top">packagelistLoc</td>
  688. <td valign="top">The location to the directory containing the package-list file for
  689. the external documentation</td>
  690. <td align="center" valign="top" rowspan="2">One of the two if the offline attribute is true</td>
  691. </tr>
  692. <tr>
  693. <td valign="top">packagelistURL</td>
  694. <td valign="top">The URL of the the directory containing the package-list file for
  695. the external documentation</td>
  696. </tr>
  697. <tr>
  698. <td valign="top">resolveLink</td>
  699. <td valign="top">If the link attribute is a relative file name,
  700. Ant will first try to locate the file relative to the current
  701. project's basedir and if it finds a file there use an absolute URL
  702. for the link attribute, otherwise it will pass the file name
  703. verbatim to the javadoc command.</td>
  704. <td align="center" valign="top">No, default is false.</td>
  705. </tr>
  706. </table>
  707. <h4><a name="groupelement">group</a></h4>
  708. <p>Separates packages on the overview page into whatever groups you
  709. specify, one group per table. This performs the same role as the group
  710. attribute. You can use either syntax (or both at once), but with the
  711. nested elements you can easily specify multiple occurrences of the
  712. arguments.</p>
  713. <h5>Parameters</h5>
  714. <table width="90%" border="1" cellpadding="2" cellspacing="0">
  715. <tr>
  716. <td valign="top"><b>Attribute</b></td>
  717. <td valign="top"><b>Description</b></td>
  718. <td align="center" valign="top"><b>Required</b></td>
  719. </tr>
  720. <tr>
  721. <td valign="top">title</td>
  722. <td valign="top">Title of the group</td>
  723. <td align="center" valign="top">Yes, unless nested <code>&lt;title&gt;</code> given</td>
  724. </tr>
  725. <tr>
  726. <td valign="top">packages</td>
  727. <td valign="top">List of packages to include in that group. Multiple packages are separated with ':'.</td>
  728. <td align="center" valign="top">Yes, unless nested <code>&lt;package&gt;</code>s given</td>
  729. </tr>
  730. </table>
  731. <p>The title may be specified as a nested <code>&lt;title&gt;</code> element
  732. with text contents, and the packages may be listed with nested
  733. <code>&lt;package&gt;</code> elements as for the main task.</p>
  734. <h4>doclet</h4>
  735. <p>The doclet nested element is used to specify the
  736. <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/doclet/overview.html">doclet</a>
  737. that javadoc will use to process the input source files. A number of the standard javadoc arguments
  738. are actually arguments of the standard doclet. If these are specified in the javadoc
  739. task's attributes, they will be passed to the doclet specified in the
  740. <code>&lt;doclet&gt;</code> nested element. Such attributes should only be specified,
  741. therefore, if they can be interpreted by the doclet in use.</p>
  742. <p>If the doclet requires additional parameters, these can be specified with
  743. <code>&lt;param&gt;</code> elements within the <code>&lt;doclet&gt;</code>
  744. element. These parameters are restricted to simple strings. An example usage
  745. of the doclet element is shown below:</p>
  746. <pre> &lt;javadoc ... &gt;
  747. &lt;doclet name=&quot;theDoclet&quot;
  748. path=&quot;path/to/theDoclet&quot;&gt;
  749. &lt;param name=&quot;-foo&quot; value=&quot;foovalue&quot;/&gt;
  750. &lt;param name=&quot;-bar&quot; value=&quot;barvalue&quot;/&gt;
  751. &lt;/doclet&gt;
  752. &lt;/javadoc&gt;
  753. </pre>
  754. <h4><a name="tagelement">tag</a></h4>
  755. <p>If you want to specify a standard tag using a nested tag element
  756. because you want to determine the order the tags are output, you must
  757. not set the description attribute for those tags.</p>
  758. <h5>Parameters</h5>
  759. <table width="90%" border="1" cellpadding="2" cellspacing="0">
  760. <tr>
  761. <td valign="top"><b>Attribute</b></td>
  762. <td valign="top"><b>Description</b></td>
  763. <td align="center" valign="top"><b>Required</b></td>
  764. </tr>
  765. <tr>
  766. <td valign="top">name</td>
  767. <td valign="top">Name of the tag (e.g. <code>todo</code>)</td>
  768. <td align="center" valign="top">Yes, unless the <code>dir</code> attribute is specified.</td>
  769. </tr>
  770. <tr>
  771. <td valign="top">description</td>
  772. <td valign="top">Description for tag (e.g. <code>To do:</code>)</td>
  773. <td align="center" valign="top">
  774. No, the javadoc executable will pick a default if this is not specified.
  775. </td>
  776. </tr>
  777. <tr>
  778. <td valign="top">enabled</td>
  779. <td valign="top">Whether or not the tag is enabled (defaults to <code>true</code>)</td>
  780. <td align="center" valign="top">No</td>
  781. </tr>
  782. <tr>
  783. <td valign="top">scope</td>
  784. <td valign="top">Scope for the tag - the elements in which it can be used. This
  785. is a comma separated list of some of the elements: <code>overview</code>,
  786. <code>packages</code>, <code>types</code>, <code>constructors</code>,
  787. <code>methods</code>, <code>fields</code> or the default, <code>all</code>.</td>
  788. <td align="center" valign="top">No</td>
  789. </tr>
  790. <tr>
  791. <td valign="top">dir</td>
  792. <td valign="top">If this attribute is specified, this element will behave as an implicit
  793. <a href="../Types/fileset.html">fileset</a>. The files included by this fileset should
  794. contain each tag definition on a separate line, as described in the
  795. <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadoctags">Javadoc reference guide</a>:
  796. <pre>ejb.bean:t:XDoclet EJB Tag
  797. todo:a:To Do</pre>
  798. <b>Note:</b> The Javadoc reference quide has double quotes around
  799. the description part of the definition. This will not work when used in
  800. a file, as the definition is quoted again when given to
  801. the javadoc program.
  802. <br/>
  803. <b>Note:</b> If this attribute is specified, all the other attributes in this
  804. element will be ignored.
  805. </td>
  806. <td align="center" valign="top">No</td>
  807. </tr>
  808. </table>
  809. <h4><a name="tagletelement">taglet</a></h4>
  810. <p>The taglet nested element is used to specify custom
  811. <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/overview.html">taglets</a> beyond <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadoctags" target="_blank">the default taglets</a>.</p>
  812. <h5>Parameters</h5>
  813. <table width="90%" border="1" cellpadding="2" cellspacing="0">
  814. <tr>
  815. <td valign="top"><b>Attribute</b></td>
  816. <td valign="top"><b>Description</b></td>
  817. <td align="center" valign="top"><b>Required</b></td>
  818. </tr>
  819. <tr>
  820. <td valign="top">name</td>
  821. <td valign="top">The name of the taglet class
  822. (e.g. <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/ToDoTaglet.java">
  823. <code>com.sun.tools.doclets.ToDoTaglet</code></a>)</td>
  824. <td align="center" valign="top">Yes</td>
  825. </tr>
  826. <tr>
  827. <td valign="top">path</td>
  828. <td valign="top">A path specifying the search path for the taglet class
  829. (e.g. <code>/home/taglets</code>).
  830. The path may also be specified by a nested <code>&lt;path&gt;</code> element</td>
  831. <td align="center" valign="top">No</td>
  832. </tr>
  833. </table>
  834. <h4>sourcepath, classpath, bootclasspath, modulepath, modulesourcepath</h4>
  835. <p><code>Javadoc</code>'s <i>sourcepath</i>, <i>classpath</i>,
  836. <i>bootclasspath</i>, <i>modulepath</i>, and <i>modulesourcepath</i>
  837. attributes are <a href="../using.html#path">PATH like structure</a>
  838. and can also be set via nested <i>sourcepath</i>,
  839. <i>classpath</i>, <i>bootclasspath</i>, <i>modulepath</i>,
  840. and <i>modulesourcepath</i> elements respectively.</p>
  841. <h4>arg</h4>
  842. <p>Use nested <code>&lt;arg&gt;</code> to specify additional
  843. arguments. See <a href="../using.html#arg">Command line
  844. arguments</a>. <em>Since Ant 1.6</em></p>
  845. <h3>Example</h3>
  846. <pre> &lt;javadoc packagenames=&quot;com.dummy.test.*&quot;
  847. sourcepath=&quot;src&quot;
  848. excludepackagenames=&quot;com.dummy.test.doc-files.*&quot;
  849. defaultexcludes=&quot;yes&quot;
  850. destdir=&quot;docs/api&quot;
  851. author=&quot;true&quot;
  852. version=&quot;true&quot;
  853. use=&quot;true&quot;
  854. windowtitle=&quot;Test API&quot;&gt;
  855. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  856. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  857. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  858. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  859. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  860. &lt;link offline=&quot;true&quot; href=&quot;http://docs.oracle.com/javase/7/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  861. &lt;link href=&quot;http://docs.oracle.com/javase/7/docs/api/&quot;/&gt;
  862. &lt/javadoc&gt;</pre>
  863. <p>is the same as</p>
  864. <pre> &lt;javadoc
  865. destdir=&quot;docs/api&quot;
  866. author=&quot;true&quot;
  867. version=&quot;true&quot;
  868. use=&quot;true&quot;
  869. windowtitle=&quot;Test API&quot;&gt;
  870. &lt;packageset dir=&quot;src&quot; defaultexcludes=&quot;yes&quot;&gt;
  871. &lt;include name=&quot;com/dummy/test/**&quot;/&gt;
  872. &lt;exclude name=&quot;com/dummy/test/doc-files/**&quot;/&gt;
  873. &lt;/packageset&gt;
  874. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  875. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  876. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  877. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  878. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  879. &lt;link offline=&quot;true&quot; href=&quot;http://docs.oracle.com/javase/7/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  880. &lt;link href=&quot;http://docs.oracle.com/javase/7/docs/api/&quot;/&gt;
  881. &lt/javadoc&gt;</pre>
  882. <p>or</p>
  883. <pre> &lt;javadoc
  884. destdir=&quot;docs/api&quot;
  885. author=&quot;true&quot;
  886. version=&quot;true&quot;
  887. use=&quot;true&quot;
  888. windowtitle=&quot;Test API&quot;&gt;
  889. &lt;fileset dir=&quot;src&quot; defaultexcludes=&quot;yes&quot;&gt;
  890. &lt;include name=&quot;com/dummy/test/**&quot;/&gt;
  891. &lt;exclude name=&quot;com/dummy/test/doc-files/**&quot;/&gt;
  892. &lt;/fileset&gt;
  893. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  894. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  895. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  896. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  897. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  898. &lt;link offline=&quot;true&quot; href=&quot;http://docs.oracle.com/javase/7/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  899. &lt;link href=&quot;http://docs.oracle.com/javase/7/docs/api/&quot;/&gt;
  900. &lt/javadoc&gt;</pre>
  901. </body>
  902. </html>