Class TestJavadocJar

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    AggregatorTestJavadocJar

    @Mojo(name="test-jar",
          defaultPhase=PACKAGE,
          requiresDependencyResolution=TEST,
          threadSafe=true)
    public class TestJavadocJar
    extends JavadocJar
    Bundles the Javadoc documentation for test Java code in an NON aggregator project into a jar using the standard Javadoc Tool.
    Since:
    2.5
    • Field Detail

      • outputDirectory

        @Parameter(defaultValue="${project.build.directory}/testapidocs",
                   required=true)
        private java.io.File outputDirectory
        Specifies the destination directory where Javadoc saves the generated HTML files.
        See d.
      • testDoctitle

        @Parameter(property="testDoctitle",
                   alias="doctitle",
                   defaultValue="${project.name} ${project.version} Test API")
        private java.lang.String testDoctitle
        Specifies the Test title to be placed near the top of the overview summary file.
        See doctitle.
        Since:
        2.5
      • testOverview

        @Parameter(property="testOverview",
                   alias="overview",
                   defaultValue="${basedir}/src/test/javadoc/overview.html")
        private java.io.File testOverview
        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).
        See overview.
        Since:
        2.5
      • testWindowtitle

        @Parameter(property="testWindowtitle",
                   alias="windowtitle",
                   defaultValue="${project.name} ${project.version} Test API")
        private java.lang.String testWindowtitle
        Specifies the Test title to be placed in the HTML title tag.
        See windowtitle.
        Since:
        2.5
      • testJavadocDirectory

        @Parameter(alias="javadocDirectory",
                   defaultValue="${basedir}/src/test/javadoc")
        private java.io.File testJavadocDirectory
        Specifies the Test Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).
        Since:
        2.5
      • testClassifier

        @Parameter(property="maven.javadoc.testClassifier",
                   defaultValue="test-javadoc",
                   required=true)
        private java.lang.String testClassifier
        Since:
        2.10
    • Constructor Detail

      • TestJavadocJar

        public TestJavadocJar()
    • Method Detail

      • getClassifier

        protected java.lang.String getClassifier()
        Overrides:
        getClassifier in class JavadocJar
        Returns:
        the wanted classifier, i.e. javadoc or test-javadoc
      • getDoctitle

        protected java.lang.String getDoctitle()
        Overrides:
        getDoctitle in class AbstractJavadocMojo
        Returns:
        the title to be placed near the top of the overview summary file
      • getOverview

        protected java.io.File getOverview()
        Overrides:
        getOverview in class AbstractJavadocMojo
        Returns:
        the overview documentation file from the user parameter or from the javadocdirectory
      • getWindowtitle

        protected java.lang.String getWindowtitle()
        Overrides:
        getWindowtitle in class AbstractJavadocMojo
        Returns:
        the title to be placed in the HTML title tag
      • getProjectBuildOutputDirs

        protected java.util.List<java.io.File> getProjectBuildOutputDirs​(org.apache.maven.project.MavenProject p)
        Overrides:
        getProjectBuildOutputDirs in class AbstractJavadocMojo
        Parameters:
        p - not null maven project
        Returns:
        the list of directories where compiled classes are placed for the given project. These dirs are added in the javadoc classpath.
      • getProjectSourceRoots

        protected java.util.List<java.lang.String> getProjectSourceRoots​(org.apache.maven.project.MavenProject p)
        Overrides:
        getProjectSourceRoots in class AbstractJavadocMojo
        Parameters:
        p - not null maven project
        Returns:
        the list of source paths for the given project
      • getExecutionProjectSourceRoots

        protected java.util.List<java.lang.String> getExecutionProjectSourceRoots​(org.apache.maven.project.MavenProject p)
        Overrides:
        getExecutionProjectSourceRoots in class AbstractJavadocMojo
        Parameters:
        p - not null maven project
        Returns:
        the list of source paths for the execution project of the given project
      • isTest

        protected boolean isTest()
        Description copied from class: AbstractJavadocMojo
        Indicates whether this goal generates documentation for the Java Test code.
        Overrides:
        isTest in class AbstractJavadocMojo
        Returns:
        true if the goal generates Test Javadocs, false otherwise.