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

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