Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Using the <a href="http://maven.apache.org/plugins/maven-javadoc-plugin/" rel="nofollow noreferrer">maven-javadoc-plugin</a>, you cannot specify specific java classess (though you can with the javadoc utility, see below). However, via the the <a href="http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#sourcepath" rel="nofollow noreferrer">sourcepath</a> configuration option for the javadoc:javadoc goal, you can configure specific packages. An example of this follows:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt; &lt;version&gt;2.5&lt;/version&gt; &lt;configuration&gt; &lt;charset&gt;UTF-8&lt;/charset&gt; &lt;docencoding&gt;UTF-8&lt;/docencoding&gt; &lt;docfilessubdirs&gt;true&lt;/docfilessubdirs&gt; &lt;links&gt; &lt;link&gt;http://java.sun.com/j2se/1.5.0/docs/api/&lt;/link&gt; &lt;/links&gt; &lt;show&gt;protected&lt;/show&gt; &lt;source&gt;1.5&lt;/source&gt; &lt;sourcepath&gt;${basedir}/src/main/java/com/acme/foo&lt;/sourcepath&gt; &lt;/configuration&gt; &lt;reportSets&gt; &lt;reportSet&gt; &lt;reports&gt; &lt;report&gt;javadoc&lt;/report&gt; &lt;/reports&gt; &lt;/reportSet&gt; &lt;/reportSets&gt; &lt;/plugin&gt; </code></pre> <p>In this example, all classes under the <strong>com.acme.foo</strong> package (including subpackages) will have javadoc generated.</p> <p>It should be noted that this Maven plugin is simply a wrapper around <a href="http://web.archive.org/web/20090708154943/http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html" rel="nofollow noreferrer">Sun's javadoc utility</a>. As such, most of the documentation and configuration for javadoc holds true for this plugin. See Sun's documentation on the javadoc <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#sourcepath" rel="nofollow noreferrer">sourcepath parameter</a>.</p> <p>In an area where the maven-javadoc-plugin differs in functionality, Sun's documentation for the sourcepath parameter mentions that it is possible with the javadoc utility to <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#documentingclasses" rel="nofollow noreferrer">generate javadoc for specific classes</a>. This capability is not available with the maven-javadoc-plugin. An example of this is shown in Sun's documentation:</p> <pre><code> C:&gt; cd C:\home\src\java\awt C:&gt; javadoc -d C:\home\html Button.java Canvas.java Graphics*.java </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload