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 33 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  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>This task works seamlessly between different javadoc versions (1.2 and 1.4),
  34. with the obvious restriction that the 1.4 attributes
  35. will be ignored if run in a 1.2 VM.</p>
  36. <p>NOTE: since javadoc calls System.exit(), javadoc cannot be run inside the
  37. same VM as Ant without breaking functionality. For this reason, this task
  38. always forks the VM. This overhead is not significant since javadoc is normally a heavy
  39. application and will be called infrequently.</p>
  40. <p>NOTE: the packagelist attribute allows you to specify the list of packages to
  41. document outside of the Ant file. It's a much better practice to include everything
  42. inside the <code>build.xml</code> file. This option was added in order to make it easier to
  43. migrate from regular makefiles, where you would use this option of javadoc.
  44. The packages listed in packagelist are not checked, so the task performs even
  45. if some packages are missing or broken. Use this option if you wish to convert from
  46. an existing makefile. Once things are running you should then switch to the regular
  47. notation. </p>
  48. <p><i><b>DEPRECATION:</b> the javadoc2 task simply points to the javadoc task and it's
  49. there for back compatibility reasons. Since this task will be removed in future
  50. versions, you are strongly encouraged to use <a href="javadoc.html">javadoc</a>
  51. instead.</i></p>
  52. <p>In the table below, 1.2 means available if your current Java VM is
  53. a 1.2 VM (but not 1.3 or later), 1.4+ for any VM of at least version 1.4, otherwise
  54. any VM of at least version 1.2 is acceptable. JDK 1.1 is no longer supported.
  55. If you specify the <code>executable</code> attribute it is up to you
  56. to ensure that this command supports the attributes you wish to use.</p>
  57. <h3>Parameters</h3>
  58. <table border="1" cellpadding="2" cellspacing="0">
  59. <tr>
  60. <td valign="top"><b>Attribute</b></td>
  61. <td valign="top"><b>Description</b></td>
  62. <td align="center" valign="top"><b>Availability</b></td>
  63. <td align="center" valign="top"><b>Required</b></td>
  64. </tr>
  65. <tr>
  66. <td valign="top">sourcepath</td>
  67. <td valign="top">Specify where to find source files</td>
  68. <td align="center" valign="top">all</td>
  69. <td align="center" rowspan="3">At least one of the three or nested
  70. <code>&lt;sourcepath&gt;</code>, <code>&lt;fileset&gt;</code> or
  71. <code>&lt;packageset&gt;</code></td>
  72. </tr>
  73. <tr>
  74. <td valign="top">sourcepathref</td>
  75. <td valign="top">Specify where to find source files by <a
  76. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  77. <td align="center" valign="top">all</td>
  78. </tr>
  79. <tr>
  80. <td valign="top">sourcefiles</td>
  81. <td valign="top">Comma separated list of source files -- see also
  82. the nested <code>source</code> element.</td>
  83. <td align="center" valign="top">all</td>
  84. </tr>
  85. <tr>
  86. <td valign="top">destdir</td>
  87. <td valign="top">Destination directory for output files</td>
  88. <td align="center" valign="top">all</td>
  89. <td align="center" valign="top">Yes, unless a doclet has been specified.</td>
  90. </tr>
  91. <tr>
  92. <td valign="top">maxmemory</td>
  93. <td valign="top">Max amount of memory to allocate to the javadoc VM</td>
  94. <td align="center" valign="top">all</td>
  95. <td align="center" valign="top">No</td>
  96. </tr>
  97. <tr>
  98. <td valign="top">packagenames</td>
  99. <td valign="top">Comma separated list of package files (with terminating
  100. wildcard) -- see also the nested <code>package</code> element.</td>
  101. <td align="center" valign="top">all</td>
  102. <td align="center" valign="top">No</td>
  103. </tr>
  104. <tr>
  105. <td valign="top">packageList</td>
  106. <td valign="top">The name of a file containing the packages to process</td>
  107. <td align="center" valign="top">all</td>
  108. <td align="center" valign="top">No</td>
  109. </tr>
  110. <tr>
  111. <td valign="top">classpath</td>
  112. <td valign="top">Specify where to find user class files</td>
  113. <td align="center" valign="top">all</td>
  114. <td align="center" valign="top">No</td>
  115. </tr>
  116. <tr>
  117. <td valign="top">Bootclasspath</td>
  118. <td valign="top">Override location of class files loaded by the bootstrap
  119. class loader</td>
  120. <td align="center" valign="top">all</td>
  121. <td align="center" valign="top">No</td>
  122. </tr>
  123. <tr>
  124. <td valign="top">classpathref</td>
  125. <td valign="top">Specify where to find user class files by <a
  126. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  127. <td align="center" valign="top">all</td>
  128. <td align="center" valign="top">No</td>
  129. </tr>
  130. <tr>
  131. <td valign="top">bootclasspathref</td>
  132. <td valign="top">Override location of class files loaded by the
  133. bootstrap class loader by <a href="../using.html#references">reference</a> to a
  134. PATH defined elsewhere.</td>
  135. <td align="center" valign="top">all</td>
  136. <td align="center" valign="top">No</td>
  137. </tr>
  138. <tr>
  139. <td valign="top">Extdirs</td>
  140. <td valign="top">Override location of installed extensions</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">Overview</td>
  146. <td valign="top">Read overview documentation from HTML file</td>
  147. <td align="center" valign="top">all</td>
  148. <td align="center" valign="top">No</td>
  149. </tr>
  150. <tr>
  151. <td valign="top">access</td>
  152. <td valign="top">Access mode: one of <code>public</code>, <code>protected</code>,
  153. <code>package</code>, or <code>private</code></td>
  154. <td align="center" valign="top">all</td>
  155. <td align="center" valign="top">No (default <code>protected</code>)</td>
  156. </tr>
  157. <tr>
  158. <td valign="top">Public</td>
  159. <td valign="top">Show only public classes and members</td>
  160. <td align="center" valign="top">all</td>
  161. <td align="center" valign="top">No</td>
  162. </tr>
  163. <tr>
  164. <td valign="top">Protected</td>
  165. <td valign="top">Show protected/public classes and members (default)</td>
  166. <td align="center" valign="top">all</td>
  167. <td align="center" valign="top">No</td>
  168. </tr>
  169. <tr>
  170. <td valign="top">Package</td>
  171. <td valign="top">Show package/protected/public classes and members</td>
  172. <td align="center" valign="top">all</td>
  173. <td align="center" valign="top">No</td>
  174. </tr>
  175. <tr>
  176. <td valign="top">Private</td>
  177. <td valign="top">Show all classes and members</td>
  178. <td align="center" valign="top">all</td>
  179. <td align="center" valign="top">No</td>
  180. </tr>
  181. <tr>
  182. <td valign="top">Old</td>
  183. <td valign="top">Generate output using JDK 1.1 emulating doclet</td>
  184. <td align="center" valign="top">1.2</td>
  185. <td align="center" valign="top">No</td>
  186. </tr>
  187. <tr>
  188. <td valign="top">Verbose</td>
  189. <td valign="top">Output messages about what Javadoc is doing</td>
  190. <td align="center" valign="top">all</td>
  191. <td align="center" valign="top">No</td>
  192. </tr>
  193. <tr>
  194. <td valign="top">Locale</td>
  195. <td valign="top">Locale to be used, e.g. en_US or en_US_WIN</td>
  196. <td align="center" valign="top">all</td>
  197. <td align="center" valign="top">No</td>
  198. </tr>
  199. <tr>
  200. <td valign="top">Encoding</td>
  201. <td valign="top">Source file encoding name</td>
  202. <td align="center" valign="top">all</td>
  203. <td align="center" valign="top">No</td>
  204. </tr>
  205. <tr>
  206. <td valign="top">Version</td>
  207. <td valign="top">Include @version paragraphs</td>
  208. <td align="center" valign="top">all</td>
  209. <td align="center" valign="top">No</td>
  210. </tr>
  211. <tr>
  212. <td valign="top">Use</td>
  213. <td valign="top">Create class and package usage pages</td>
  214. <td align="center" valign="top">all</td>
  215. <td align="center" valign="top">No</td>
  216. </tr>
  217. <tr>
  218. <td valign="top">Author</td>
  219. <td valign="top">Include @author paragraphs</td>
  220. <td align="center" valign="top">all</td>
  221. <td align="center" valign="top">No</td>
  222. </tr>
  223. <tr>
  224. <td valign="top">Splitindex</td>
  225. <td valign="top">Split index into one file per letter</td>
  226. <td align="center" valign="top">all</td>
  227. <td align="center" valign="top">No</td>
  228. </tr>
  229. <tr>
  230. <td valign="top">Windowtitle</td>
  231. <td valign="top">Browser window title for the documentation (text)</td>
  232. <td align="center" valign="top">all</td>
  233. <td align="center" valign="top">No</td>
  234. </tr>
  235. <tr>
  236. <td valign="top">Doctitle</td>
  237. <td valign="top">Include title for the package index(first) page (html-code)</td>
  238. <td align="center" valign="top">all</td>
  239. <td align="center" valign="top">No</td>
  240. </tr>
  241. <tr>
  242. <td valign="top">Header</td>
  243. <td valign="top">Include header text for each page (html-code)</td>
  244. <td align="center" valign="top">all</td>
  245. <td align="center" valign="top">No</td>
  246. </tr>
  247. <tr>
  248. <td valign="top">Footer</td>
  249. <td valign="top">Include footer text for each page (html-code)</td>
  250. <td align="center" valign="top">all</td>
  251. <td align="center" valign="top">No</td>
  252. </tr>
  253. <tr>
  254. <td valign="top">bottom</td>
  255. <td valign="top">Include bottom text for each page (html-code)</td>
  256. <td align="center" valign="top">all</td>
  257. <td align="center" valign="top">No</td>
  258. </tr>
  259. <tr>
  260. <td valign="top">link</td>
  261. <td valign="top">Create links to javadoc output at the given URL
  262. -- see also the nested <code>link</code> element.</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">linkoffline</td>
  268. <td valign="top">Link to docs at <code>&lt;url&gt;</code> using package list at
  269. <code>&lt;url2&gt;</code> - separate the URLs by using a space character -- see
  270. also the nested <code>link</code> element.</td>
  271. <td align="center" valign="top">all</td>
  272. <td align="center" valign="top">No</td>
  273. </tr>
  274. <tr>
  275. <td valign="top">group</td>
  276. <td valign="top">Group specified packages together in overview
  277. page. The format is as described <a
  278. href="#groupattribute">below</a> -- see also the nested
  279. <code>group</code> element.</td>
  280. <td align="center" valign="top">all</td>
  281. <td align="center" valign="top">No</td>
  282. </tr>
  283. <tr>
  284. <td valign="top">nodeprecated</td>
  285. <td valign="top">Do not include @deprecated information</td>
  286. <td align="center" valign="top">all</td>
  287. <td align="center" valign="top">No</td>
  288. </tr>
  289. <tr>
  290. <td valign="top">nodeprecatedlist</td>
  291. <td valign="top">Do not generate deprecated list</td>
  292. <td align="center" valign="top">all</td>
  293. <td align="center" valign="top">No</td>
  294. </tr>
  295. <tr>
  296. <td valign="top">notree</td>
  297. <td valign="top">Do not generate class hierarchy</td>
  298. <td align="center" valign="top">all</td>
  299. <td align="center" valign="top">No</td>
  300. </tr>
  301. <tr>
  302. <td valign="top">noindex</td>
  303. <td valign="top">Do not generate index</td>
  304. <td align="center" valign="top">all</td>
  305. <td align="center" valign="top">No</td>
  306. </tr>
  307. <tr>
  308. <td valign="top">nohelp</td>
  309. <td valign="top">Do not generate help link</td>
  310. <td align="center" valign="top">all</td>
  311. <td align="center" valign="top">No</td>
  312. </tr>
  313. <tr>
  314. <td valign="top">nonavbar</td>
  315. <td valign="top">Do not generate navigation bar</td>
  316. <td align="center" valign="top">all</td>
  317. <td align="center" valign="top">No</td>
  318. </tr>
  319. <tr>
  320. <td valign="top">serialwarn</td>
  321. <td valign="top">Generate warning about @serial tag</td>
  322. <td align="center" valign="top">all</td>
  323. <td align="center" valign="top">No</td>
  324. </tr>
  325. <tr>
  326. <td valign="top">helpfile</td>
  327. <td valign="top">Specifies the HTML help file to use</td>
  328. <td align="center" valign="top">all</td>
  329. <td align="center" valign="top">No</td>
  330. </tr>
  331. <tr>
  332. <td valign="top">stylesheetfile</td>
  333. <td valign="top">Specifies the CSS stylesheet to use</td>
  334. <td align="center" valign="top">all</td>
  335. <td align="center" valign="top">No</td>
  336. </tr>
  337. <tr>
  338. <td valign="top">charset</td>
  339. <td valign="top">Charset for cross-platform viewing of generated
  340. documentation</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">docencoding</td>
  346. <td valign="top">Output file encoding name</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">doclet</td>
  352. <td valign="top">Specifies the class file that starts the doclet
  353. used in generating the documentation -- see also the nested
  354. <code>doclet</code> element.</td>
  355. <td align="center" valign="top">all</td>
  356. <td align="center" valign="top">No</td>
  357. </tr>
  358. <tr>
  359. <td valign="top">docletpath</td>
  360. <td valign="top">Specifies the path to the doclet class file that is specified with the -doclet option.</td>
  361. <td align="center" valign="top">all</td>
  362. <td align="center" valign="top">No</td>
  363. </tr>
  364. <tr>
  365. <td valign="top">docletpathref</td>
  366. <td valign="top">Specifies the path to the doclet class file that
  367. is specified with the -doclet option by <a
  368. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  369. <td align="center" valign="top">all</td>
  370. <td align="center" valign="top">No</td>
  371. </tr>
  372. <tr>
  373. <td valign="top">additionalparam</td>
  374. <td valign="top">Lets you add additional parameters to the javadoc
  375. command line. Useful for doclets. Parameters containing spaces
  376. need to be quoted using &amp;quot; -- see also the nested
  377. <code>arg</code> element.</td>
  378. <td align="center" valign="top">all</td>
  379. <td align="center" valign="top">No</td>
  380. </tr>
  381. <tr>
  382. <td valign="top">failonerror</td>
  383. <td valign="top">Stop the buildprocess if the command exits with a
  384. returncode other than 0.</td>
  385. <td align="center" valign="top">all</td>
  386. <td align="center" valign="top">No</td>
  387. </tr>
  388. <tr>
  389. <td valign="top">excludepackagenames</td>
  390. <td valign="top">comma separated list of packages you don't want
  391. docs for -- see also the nested <code>excludepackage</code> element.</td>
  392. <td align="center" valign="top">all</td>
  393. <td valign="top" align="center">No</td>
  394. </tr>
  395. <tr>
  396. <td valign="top">defaultexcludes</td>
  397. <td valign="top">indicates whether default excludes should be used
  398. (<code>yes</code> | <code>no</code>); default excludes are used when omitted.</td>
  399. <td align="center" valign="top">all</td>
  400. <td valign="top" align="center">No</td>
  401. </tr>
  402. <tr>
  403. <td valign="top">useexternalfile</td>
  404. <td valign="top">indicates whether the sourcefile name specified
  405. in srcfiles or as nested source elements should be written to a
  406. temporary file to make the command line shorter. Also applies to
  407. the package names specified via the packagenames attribute or
  408. nested package elements.
  409. (<code>yes</code> | <code>no</code>). Default is no.</td>
  410. <td align="center" valign="top">all</td>
  411. <td valign="top" align="center">No</td>
  412. </tr>
  413. <tr>
  414. <td valign="top">source</td>
  415. <td valign="top">Necessary to enable javadoc to handle assertions
  416. present in J2SE v 1.4 source code. Set this to &quot;1.4&quot; to
  417. documents code that compiles using <code>&quot;javac -source
  418. 1.4&quot;</code>.<br>
  419. A default value for this attribute can be provided using the magic
  420. <a
  421. href="../javacprops.html#source"><code>ant.build.javac.source</code></a>
  422. property.</td>
  423. <td align="center" valign="top">1.4+</td>
  424. <td align="center" valign="top">No</td>
  425. </tr>
  426. <tr>
  427. <td valign="top">linksource</td>
  428. <td valign="top">Generate hyperlinks to source files.
  429. <em>since Ant 1.6</em>.
  430. (<code>yes</code> | <code>no</code>). Default is no.</td>
  431. <td align="center" valign="top">1.4+</td>
  432. <td align="center" valign="top">No</td>
  433. </tr>
  434. <tr>
  435. <td valign="top">breakiterator</td>
  436. <td valign="top">Use the new breakiterator algorithm.
  437. <em>since Ant 1.6</em>.
  438. (<code>yes</code> | <code>no</code>). Default is no.</td>
  439. <td align="center" valign="top">1.4+</td>
  440. <td align="center" valign="top">No</td>
  441. </tr>
  442. <tr>
  443. <td valign="top">noqualifier</td>
  444. <td valign="top">Enables the <code>-noqualifier</code> argument -
  445. must be <code>all</code> or a colon separated list of packages.
  446. <em>since Ant 1.6</em>.</td>
  447. <td align="center" valign="top">1.4+</td>
  448. <td align="center" valign="top">No</td>
  449. </tr>
  450. <tr>
  451. <td valign="top">includenosourcepackages</td>
  452. <td valign="top">If set to true, packages that don't contain Java
  453. source but a package.html will get documented as well.
  454. <em>since Ant 1.6.3</em>.</td>
  455. <td align="center" valign="top">all</td>
  456. <td align="center" valign="top">No (default is <code>false</code>)</td>
  457. </tr>
  458. <tr>
  459. <td valign="top">executable</td>
  460. <td valign="top">Specify a particular <code>javadoc</code> executable
  461. to use in place of the default binary (found in the same JDK as Ant is running in).
  462. <em>since Ant 1.6.3</em>.</td>
  463. <td align="center" valign="top">all</td>
  464. <td align="center" valign="top">No</td>
  465. </tr>
  466. </table>
  467. <h4><a name="groupattribute">Format of the group attribute</a></h4>
  468. <p>The arguments are comma-delimited. Each single argument is 2
  469. space-delimited strings, where the first one is the group's title and
  470. the second one a colon delimited list of packages.</p>
  471. <p>If you need to specify more than one group, or a group whose title
  472. contains a comma or a space character, using <a
  473. href="#groupelement">nested group elements</a> is highly
  474. recommended.</p>
  475. <p>E.g.:</p>
  476. <pre> group=&quot;XSLT_Packages org.apache.xalan.xslt*,XPath_Packages org.apache.xalan.xpath*&quot;</pre>
  477. <h3>Parameters specified as nested elements</h3>
  478. <h4>packageset</h4>
  479. <p>A <a href="../CoreTypes/dirset.html">DirSet</a>. All matched
  480. directories that contain Java source files will be passed to javadoc
  481. as package names. Package names are created from the directory names
  482. by translating the directory separator into dots. Ant assumes the
  483. base directory of the packageset points to the root of a package
  484. hierarchy.</p>
  485. <p>The <code>packagenames</code>, <code>excludepackagenames</code> and
  486. <code>defaultexcludes</code> attributes of the task have no effect on
  487. the nested <code>&lt;packageset&gt;</code> elements.</p>
  488. <h4>fileset</h4>
  489. <p>A <a href="../CoreTypes/fileset.html">FileSet</a>. All matched
  490. files will be passed to javadoc as source files. Ant will
  491. automatically add the include pattern <code>**/*.java</code> (and
  492. <code>**/package.html</code> if includenosourcepackages is true) to
  493. these filesets.</p>
  494. <p>Nested filesets can be used to document sources that are in the
  495. default package or if you want to exclude certain files from
  496. documentation. If you want to document all source files and don't use
  497. the default package, packagesets should be used instead as this
  498. increases javadocs performance.</p>
  499. <p>The <code>packagenames</code>, <code>excludepackagenames</code> and
  500. <code>defaultexcludes</code> attributes of the task have no effect on
  501. the nested <code>&lt;fileset&gt;</code> elements.</p>
  502. <h4>sourcefiles</h4>
  503. <p>A container for arbitrary file system based <a
  504. href="../CoreTypes/resources.html#collection">resource
  505. collections</a>. All files contained in any of the nested collections
  506. (this includes nested filesets, filelists or paths) will be passed to
  507. javadoc as source files.</p>
  508. <h4>package</h4>
  509. <p>Same as one entry in the list given by <code>packagenames</code>.</p>
  510. <h5>Parameters</h5>
  511. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  512. <tr>
  513. <td valign="top"><b>Attribute</b></td>
  514. <td valign="top"><b>Description</b></td>
  515. <td align="center" valign="top"><b>Required</b></td>
  516. </tr>
  517. <tr>
  518. <td valign="top">name</td>
  519. <td valign="top">The package name (may be a wildcard)</td>
  520. <td align="center" valign="top">Yes</td>
  521. </tr>
  522. </table>
  523. <h4>excludepackage</h4>
  524. <p>Same as one entry in the list given by <code>excludepackagenames</code>.</p>
  525. <h5>Parameters</h5>
  526. Same as for <code>package</code>.
  527. <h4>source</h4>
  528. <p>Same as one entry in the list given by <code>sourcefiles</code>.</p>
  529. <h5>Parameters</h5>
  530. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  531. <tr>
  532. <td valign="top"><b>Attribute</b></td>
  533. <td valign="top"><b>Description</b></td>
  534. <td align="center" valign="top"><b>Required</b></td>
  535. </tr>
  536. <tr>
  537. <td valign="top">file</td>
  538. <td valign="top">The source file to document</td>
  539. <td align="center" valign="top">Yes</td>
  540. </tr>
  541. </table>
  542. <h4>doctitle</h4>
  543. <p>Same as the <code>doctitle</code> attribute, but you can nest text
  544. inside the element this way.</p>
  545. <h4>header</h4>
  546. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  547. <h4>footer</h4>
  548. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  549. <h4>bottom</h4>
  550. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  551. <h4>link</h4>
  552. <p>Create link to javadoc output at the given URL. This performs the
  553. same role as the link and linkoffline attributes. You can use either
  554. syntax (or both at once), but with the nested elements you can easily
  555. specify multiple occurrences of the arguments.</p>
  556. <h5>Parameters</h5>
  557. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  558. <tr>
  559. <td valign="top"><b>Attribute</b></td>
  560. <td valign="top"><b>Description</b></td>
  561. <td align="center" valign="top"><b>Required</b></td>
  562. </tr>
  563. <tr>
  564. <td valign="top">href</td>
  565. <td valign="top">The URL for the external documentation you wish
  566. to link to. This can be an absolute URL, or a relative file
  567. name.</td>
  568. <td align="center" valign="top">Yes</td>
  569. </tr>
  570. <tr>
  571. <td valign="top">offline</td>
  572. <td valign="top">True if this link is not available online at the time of
  573. generating the documentation</td>
  574. <td align="center" valign="top">No</td>
  575. </tr>
  576. <tr>
  577. <td valign="top">packagelistLoc</td>
  578. <td valign="top">The location to the directory containing the package-list file for
  579. the external documentation</td>
  580. <td align="center" valign="top">Only if the offline attribute is true</td>
  581. </tr>
  582. <tr>
  583. <td valign="top">resolveLink</td>
  584. <td valign="top">If the link attribute is a relative file name,
  585. Ant will first try to locate the file relative to the current
  586. project's basedir and if it finds a file there use an absolute URL
  587. for the link attribute, otherwise it will pass the file name
  588. verbatim to the javadoc command.</td>
  589. <td align="center" valign="top">No, default is false.</td>
  590. </tr>
  591. </table>
  592. <h4><a name="groupelement">group</a></h4>
  593. <p>Separates packages on the overview page into whatever groups you
  594. specify, one group per table. This performs the same role as the group
  595. attribute. You can use either syntax (or both at once), but with the
  596. nested elements you can easily specify multiple occurrences of the
  597. arguments.</p>
  598. <h5>Parameters</h5>
  599. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  600. <tr>
  601. <td valign="top"><b>Attribute</b></td>
  602. <td valign="top"><b>Description</b></td>
  603. <td align="center" valign="top"><b>Required</b></td>
  604. </tr>
  605. <tr>
  606. <td valign="top">title</td>
  607. <td valign="top">Title of the group</td>
  608. <td align="center" valign="top">Yes, unless nested <code>&lt;title&gt;</code> given</td>
  609. </tr>
  610. <tr>
  611. <td valign="top">packages</td>
  612. <td valign="top">List of packages to include in that group. Multiple packages are separated with ':'.</td>
  613. <td align="center" valign="top">Yes, unless nested <code>&lt;package&gt;</code>s given</td>
  614. </tr>
  615. </table>
  616. <p>The title may be specified as a nested <code>&lt;title&gt;</code> element
  617. with text contents, and the packages may be listed with nested
  618. <code>&lt;package&gt;</code> elements as for the main task.</p>
  619. <h4>doclet</h4>
  620. <p>The doclet nested element is used to specify the doclet that javadoc will
  621. use to process the input source files. A number of the standard javadoc arguments
  622. are actually arguments of the standard doclet. If these are specified in the javadoc
  623. task's attributes, they will be passed to the doclet specified in the
  624. <code>&lt;doclet&gt;</code> nested element. Such attributes should only be specified,
  625. therefore, if they can be interpreted by the doclet in use.</p>
  626. <p>If the doclet requires additional parameters, these can be specified with
  627. <code>&lt;param&gt;</code> elements within the <code>&lt;doclet&gt;</code>
  628. element. These parameters are restricted to simple strings. An example usage
  629. of the doclet element is shown below:</p>
  630. <pre> &lt;javadoc ... &gt;
  631. &lt;doclet name=&quot;theDoclet&quot;
  632. path=&quot;path/to/theDoclet&quot;&gt;
  633. &lt;param name=&quot;-foo&quot; value=&quot;foovalue&quot;/&gt;
  634. &lt;param name=&quot;-bar&quot; value=&quot;barvalue&quot;/&gt;
  635. &lt;/doclet&gt;
  636. &lt;/javadoc&gt;
  637. </pre>
  638. <h4><a name="tagelement">tag</a></h4>
  639. <p>The tag nested element is used to specify custom tags. This option
  640. is only available with Java 1.4.</p>
  641. <p>If you want to specify a standard tag using a nested tag element
  642. because you want to determine the order the tags are output, you must
  643. not set the description attribute for those tags.</p>
  644. <h5>Parameters</h5>
  645. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  646. <tr>
  647. <td valign="top"><b>Attribute</b></td>
  648. <td valign="top"><b>Description</b></td>
  649. <td align="center" valign="top"><b>Required</b></td>
  650. </tr>
  651. <tr>
  652. <td valign="top">name</td>
  653. <td valign="top">Name of the tag (e.g. <code>todo</code>)</td>
  654. <td align="center" valign="top">Yes, unless the <code>dir</code> attribute is specified.</td>
  655. </tr>
  656. <tr>
  657. <td valign="top">description</td>
  658. <td valign="top">Description for tag (e.g. <code>To do:</code>)</td>
  659. <td align="center" valign="top">Yes, unless the <code>dir</code>
  660. attribute is specified or name is a standard tag.</td>
  661. </tr>
  662. <tr>
  663. <td valign="top">enabled</td>
  664. <td valign="top">Whether or not the tag is enabled (defaults to <code>true</code>)</td>
  665. <td align="center" valign="top">No</td>
  666. </tr>
  667. <tr>
  668. <td valign="top">scope</td>
  669. <td valign="top">Scope for the tag - the elements in which it can be used. This
  670. is a comma separated list of some of the elements: <code>overview</code>,
  671. <code>packages</code>, <code>types</code>, <code>constructors</code>,
  672. <code>methods</code>, <code>fields</code> or the default, <code>all</code>.</td>
  673. <td align="center" valign="top">No</td>
  674. </tr>
  675. <tr>
  676. <td valign="top">dir</td>
  677. <td valign="top">If this attribute is specified, this element will behave as an implicit
  678. <a href="../CoreTypes/fileset.html">fileset</a>. The files included by this fileset should
  679. contain each tag definition on a separate line, as described in the
  680. <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#tag">Javadoc reference guide</a>:
  681. <pre>ejb.bean:t:"XDoclet EJB Tag"
  682. todo:a:"To Do"</pre>
  683. Note: If this attribute is specified, all the other attributes in this
  684. element will be ignored.
  685. </td>
  686. <td align="center" valign="top">No</td>
  687. </tr>
  688. </table>
  689. <h4><a name="tagletelement">taglet</a></h4>
  690. <p>The taglet nested element is used to specify custom taglets. This option is
  691. only available with Java 1.4.</p>
  692. <h5>Parameters</h5>
  693. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  694. <tr>
  695. <td valign="top"><b>Attribute</b></td>
  696. <td valign="top"><b>Description</b></td>
  697. <td align="center" valign="top"><b>Required</b></td>
  698. </tr>
  699. <tr>
  700. <td valign="top">name</td>
  701. <td valign="top">The name of the taglet class
  702. (e.g. <code>com.sun.tools.doclets.ToDoTaglet</code>)</td>
  703. <td align="center" valign="top">Yes</td>
  704. </tr>
  705. <tr>
  706. <td valign="top">path</td>
  707. <td valign="top">A path specifying the search path for the taglet class
  708. (e.g. <code>/home/taglets</code>).
  709. The path may also be specified by a nested <code>&lt;path&gt;</code> element</td>
  710. <td align="center" valign="top">No</td>
  711. </tr>
  712. </table>
  713. <h4>sourcepath, classpath and bootclasspath</h4>
  714. <p><code>Javadoc</code>'s <i>sourcepath</i>, <i>classpath</i> and
  715. <i>bootclasspath</i> attributes are <a href="../using.html#path">PATH like
  716. structure</a> and can also be set via nested <i>sourcepath</i>,
  717. <i>classpath</i> and <i>bootclasspath</i> elements
  718. respectively.</p>
  719. <h4>arg</h4>
  720. <p>Use nested <code>&lt;arg&gt;</code> to specify additional
  721. arguments. See <a href="../using.html#arg">Command line
  722. arguments</a>. <em>Since Ant 1.6</em></p>
  723. <h3>Example</h3>
  724. <pre> &lt;javadoc packagenames=&quot;com.dummy.test.*&quot;
  725. sourcepath=&quot;src&quot;
  726. excludepackagenames=&quot;com.dummy.test.doc-files.*&quot;
  727. defaultexcludes=&quot;yes&quot;
  728. destdir=&quot;docs/api&quot;
  729. author=&quot;true&quot;
  730. version=&quot;true&quot;
  731. use=&quot;true&quot;
  732. windowtitle=&quot;Test API&quot;&gt;
  733. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  734. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  735. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  736. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  737. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  738. &lt;link offline=&quot;true&quot; href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  739. &lt;link href=&quot;http://developer.java.sun.com/developer/products/xml/docs/api/&quot;/&gt;
  740. &lt/javadoc&gt;</pre>
  741. <p>is the same as</p>
  742. <pre> &lt;javadoc
  743. destdir=&quot;docs/api&quot;
  744. author=&quot;true&quot;
  745. version=&quot;true&quot;
  746. use=&quot;true&quot;
  747. windowtitle=&quot;Test API&quot;&gt;
  748. &lt;packageset dir=&quot;src&quot; defaultexcludes=&quot;yes&quot;&gt;
  749. &lt;include name=&quot;com/dummy/test/**&quot;/&gt;
  750. &lt;exclude name=&quot;com/dummy/test/doc-files/**&quot;/&gt;
  751. &lt;/packageset&gt;
  752. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  753. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  754. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  755. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  756. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  757. &lt;link offline=&quot;true&quot; href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  758. &lt;link href=&quot;http://developer.java.sun.com/developer/products/xml/docs/api/&quot;/&gt;
  759. &lt/javadoc&gt;</pre>
  760. <p>or</p>
  761. <pre> &lt;javadoc
  762. destdir=&quot;docs/api&quot;
  763. author=&quot;true&quot;
  764. version=&quot;true&quot;
  765. use=&quot;true&quot;
  766. windowtitle=&quot;Test API&quot;&gt;
  767. &lt;fileset dir=&quot;src&quot; defaultexcludes=&quot;yes&quot;&gt;
  768. &lt;include name=&quot;com/dummy/test/**&quot;/&gt;
  769. &lt;exclude name=&quot;com/dummy/test/doc-files/**&quot;/&gt;
  770. &lt;/fileset&gt;
  771. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  772. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  773. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  774. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  775. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  776. &lt;link offline=&quot;true&quot; href=&quot;http://java.sun.com/j2se/1.5.0/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  777. &lt;link href=&quot;http://developer.java.sun.com/developer/products/xml/docs/api/&quot;/&gt;
  778. &lt/javadoc&gt;</pre>
  779. </body>
  780. </html>