Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MJAVADOC-729] Link to Javadoc references from JDK 17 #161

Merged
merged 4 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@

/**
* Abstract class to fix Javadoc documentation and tags in source files.
* <br>
* See <a href="https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#wheretags">Where Tags
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used">Where Tags
* Can Be Used</a>.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 2.6
*/
Expand Down Expand Up @@ -346,15 +344,12 @@ public abstract class AbstractFixJavadocMojo
* Specifies the access level for classes and members to show in the Javadocs.
* Possible values are:
* <ul>
* <li><a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#public">public</a>
* (shows only public classes and members)</li>
* <li><a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#protected">protected</a>
* (shows only public and protected classes and members)</li>
* <li><a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#package">package</a>
* (shows all classes and members not marked private)</li>
* <li><a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#private">private</a>
* (shows all classes and members)</li>
* <li>public (shows only public classes and members)</li>
* <li>protected (shows only public and protected classes and members)</li>
* <li>package (shows all classes and members not marked private)</li>
* <li>private (shows all classes and members)</li>
* </ul>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#options-for-javadoc">private, protected, public, package options for Javadoc</a>
*/
@Parameter ( property = "level", defaultValue = "protected" )
private String level;
Expand Down
427 changes: 123 additions & 304 deletions src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

/**
* <p>Bundles the Javadoc documentation for main <code>Java code</code> in an <b>aggregator</b> project into a jar
* using the standard <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.</p>
* using the standard <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.
* </p>
*
* <p>Since version 3.1.0 an aggregated jar is created for every module of a Maven multimodule project.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/**
* Generates documentation for the <code>Java code</code> in an <b>aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.
*
* @since 3.1.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/**
* <p>Generates documentation for the <code>Java code</code> in an <b>aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.</p>
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.</p>
*
* <p>Since version 3.1.0 an aggregated report is created for every module of a Maven multimodule project.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

/**
* <p>Bundles the Javadoc documentation for <code>Java Test code</code> in an <b>aggregator</b> project into a jar
* using the standard <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.</p>
* using the standard <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.
* </p>
*
* <p>Since version 3.1.0 an aggregated jar is created for every module of a Maven multimodule project.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/**
* Generates documentation for the <code>Java Test code</code> in an <b>aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.
*
* @version $Id$
* @since 3.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/**
* <p>Generates documentation for the <code>Java Test code</code> in an <b>aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.</p>
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.</p>
*
* <p>Since version 3.1.0 an aggregated report is created for every module of a Maven multimodule project.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@

/**
* Fix Javadoc documentation and tags for the <code>Java code</code> for the project.
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#wheretags">Where Tags Can
* Be Used</a>.
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used">Where Tags
* Can Be Used</a>
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 2.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@

/**
* Bundles the Javadoc documentation for <code>main Java code</code> in an <b>NON aggregator</b> project into
* a jar using the standard <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.
* a jar using the standard <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">
* Javadoc Tool</a>.
*
* @since 2.0
*/
Expand Down Expand Up @@ -95,8 +96,7 @@ public class JavadocJar

/**
* Specifies the destination directory where javadoc saves the generated HTML files.
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#d">d</a>.
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option d</a>.
* @deprecated
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

/**
* Generates documentation for the <code>Java code</code> in an <b>NON aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>. Note that this
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>. Note that this
* goal does require generation of sources before site generation, e.g. by invoking {@code mvn clean deploy site}.
*
* @author <a href="mailto:mfriedenhagen@apache.org">Mirko Friedenhagen</a>
* @since 2.10
* @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>
* @see <a href="http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javadoc.html#options">Javadoc Options</a>
*/
@Mojo( name = "javadoc-no-fork", requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@

/**
* Generates documentation for the <code>Java code</code> in an <b>NON aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.
*
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 2.0
* @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>
* @see <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#options">Javadoc Options</a>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>
*/
@Mojo( name = "javadoc", requiresDependencyResolution = ResolutionScope.COMPILE, threadSafe = true )
@Execute( phase = LifecyclePhase.GENERATE_SOURCES )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@

/**
* Fix Javadoc documentation and tags for the <code>Test Java code</code> for the project.
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#wheretags">Where Tags Can
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used">Where Tags Can
* Be Used</a>.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 2.6
*/
Expand Down
23 changes: 6 additions & 17 deletions src/main/java/org/apache/maven/plugins/javadoc/TestJavadocJar.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

/**
* Bundles the Javadoc documentation for <code>test Java code</code> in an <b>NON aggregator</b> project into
* a jar using the standard <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.
* a jar using the standard <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">
* Javadoc Tool</a>.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 2.5
Expand All @@ -52,19 +53,14 @@ public class TestJavadocJar

/**
* Specifies the destination directory where Javadoc saves the generated HTML files.
* <br/>
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#d">d</a>.
* <br/>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option d</a>.
*/
@Parameter( defaultValue = "${project.build.directory}/testapidocs", required = true )
private File outputDirectory;

/**
* Specifies the Test title to be placed near the top of the overview summary file.
* <br/>
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#doctitle">doctitle</a>.
* <br/>
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option doctitle</a>.
* @since 2.5
*/
@Parameter( property = "testDoctitle", alias = "doctitle",
Expand All @@ -74,10 +70,7 @@ public class TestJavadocJar
/**
* Specifies that Javadoc should retrieve the text for the Test overview documentation from the "source" file
* specified by path/filename and place it on the Overview page (overview-summary.html).
* <br/>
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#overview">overview</a>.
* <br/>
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option overview</a>.
* @since 2.5
*/
@Parameter( property = "testOverview", alias = "overview",
Expand All @@ -86,11 +79,7 @@ public class TestJavadocJar

/**
* Specifies the Test title to be placed in the HTML title tag.
* <br/>
* See
* <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#windowtitle">windowtitle</a>.
* <br/>
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option windowtitle</a>.
* @since 2.5
*/
@Parameter( property = "testWindowtitle", alias = "windowtitle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

/**
* Generates documentation for the <code>Java Test code</code> in an <b>NON aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>. Note that this
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>. Note that this
* goal does require generation of test sources before site generation, e.g. by invoking
* {@code mvn clean deploy site}.
*
* @author <a href="mailto:mfriedenhagen@apache.org">Mirko Friedenhagen</a>
* @since 2.10
* @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>
* @see <a href="http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javadoc.html#options">Javadoc Options </a>
*/
@Mojo( name = "test-javadoc-no-fork", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@

/**
* Generates documentation for the <code>Java Test code</code> in an <b>NON aggregator</b> project using the standard
* <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>.
* <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>.
*
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @since 2.3
* @see <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/">Javadoc Tool</a>
* @see <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#options">Javadoc Options </a>
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html">Javadoc Tool</a>
*/
@Mojo( name = "test-javadoc", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
@Execute( phase = LifecyclePhase.GENERATE_TEST_SOURCES )
Expand All @@ -59,10 +58,7 @@ public class TestJavadocReport

/**
* Specifies the Test title to be placed near the top of the overview summary file.
* <br/>
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#doctitle">doctitle</a>.
* <br/>
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option doctitle</a>.
* @since 2.5
*/
@Parameter( property = "testDoctitle", alias = "doctitle",
Expand All @@ -72,12 +68,7 @@ public class TestJavadocReport
/**
* Specifies that Javadoc should retrieve the text for the Test overview documentation from the "source" file
* specified by path/filename and place it on the Overview page (overview-summary.html).
* <br/>
* <b>Note</b>: could be in conflict with &lt;nooverview/&gt;.
* <br/>
* See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#overview">overview</a>.
* <br/>
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option overview</a>.
* @since 2.5
*/
@Parameter( property = "testOverview", alias = "overview",
Expand All @@ -86,11 +77,7 @@ public class TestJavadocReport

/**
* Specifies the Test title to be placed in the HTML title tag.
* <br/>
* See
* <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#windowtitle">windowtitle</a>.
* <br/>
*
* @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#standard-doclet-options">Doclet option windowtitle</a>.
* @since 2.5
*/
@Parameter( property = "testWindowtitle", alias = "windowtitle",
Expand Down