Class SeoJavadocFilterTask

All Implemented Interfaces:
Cloneable

public class SeoJavadocFilterTask extends Task
Ant task that invokes SeoJavadocFilter.filterJavadocJar(java.io.File, java.lang.String, java.lang.Iterable, java.lang.Iterable).

Note: This task should be performed before ZipTimestampMergeTask in order to have correct content to be able to maintain timestamps.

Author:
AO Industries, Inc.
  • Constructor Details

    • SeoJavadocFilterTask

      public SeoJavadocFilterTask()
  • Method Details

    • setBuildDirectory

      public void setBuildDirectory(String buildDirectory)
      The current build directory. Must exist and be a directory.

      Each file ending with ""-javadoc.jar"" (case-insensitive) will be processed.

      Each file is a Javadoc JAR file to filter and must be a regular file.

    • setProjectUrl

      public void setProjectUrl(String projectUrl)
      The project url. The apidocs URLs will be based on this, depending on artifact classifier. Ending in "*-test-javadoc.jar" will be "${projectUrl}${subprojectSubpath}test/apidocs/". Otherwise will be "${projectUrl}${subprojectSubpath}apidocs/"
      See Also:
    • setSubprojectSubpath

      public void setSubprojectSubpath(String subprojectSubpath)
      The sub-project sub-path used in the url.
      See Also:
    • setNofollow

      public void setNofollow(String nofollow)
      The comma/whitespace separated list of URL prefixes (case-insensitive) to set as rel="nofollow". May use SeoJavadocFilter.ANY_URL to match all. Nofollow are matched before follow.

      If starts with a slash '/', will also set the prefix-matched Javadocs pages to robots "noindex, nofollow".

      If no match is found in either nofollow or follow, the filtering will throw an exception. This can be useful for those who want to ensure every URL is considered.

      May use word "default" in list to add default entries in addition to your own. May use word "javase" to exclude Java SE. May use word "javaee" or "jakartaee" to exclude both Java EE and Jakarta EE.

      Defaults to exclude Java SE, Java EE, and Jakarta EE apidocs.

    • setFollow

      public void setFollow(String follow)
      The comma/whitespace separated list of URL prefixes (case-insensitive) to not set as rel="nofollow". May use SeoJavadocFilter.ANY_URL to match all. Follow are matched after nofollow.

      If no match is found in either nofollow or follow, the filtering will throw an exception. This can be useful for those who want to ensure every URL is considered.

      May use word "javase" to include Java SE. May use word "javaee" or "jakartaee" to include both Java EE and Jakarta EE.

      Defaults to ""*"" (all).

    • execute

      public void execute() throws BuildException
      Overrides:
      execute in class Task
      Throws:
      BuildException