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

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