Class TestJavadocReport

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenMultiPageReport, org.apache.maven.reporting.MavenReport
Direct Known Subclasses:
AggregatorTestJavadocReport, TestJavadocNoForkReport

@Mojo(name="test-javadoc", requiresDependencyResolution=TEST, threadSafe=true) @Execute(phase=GENERATE_TEST_SOURCES) public class TestJavadocReport extends JavadocReport
Generates documentation for the Java Test code in a NON aggregator project using the standard Javadoc Tool.
Since:
2.3
See Also:
  • Field Details

    • testDoctitle

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

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

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

      @Parameter(alias="javadocDirectory", defaultValue="${basedir}/src/test/javadoc") private File testJavadocDirectory
      Specifies the Test Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).
      Could be used in addition of docfilessubdirs parameter.
      See docfilessubdirs.
      Since:
      2.5
    • testName

      @Parameter(property="testName", alias="name") private String testName
      The name of the Test Javadoc report to be displayed in the Maven Generated Reports page (i.e. project-reports.html).
      Since:
      2.5
    • testDescription

      @Parameter(property="testDescription", alias="description") private String testDescription
      The description of the Test Javadoc report to be displayed in the Maven Generated Reports page (i.e. project-reports.html).
      Since:
      2.5
  • Constructor Details

    • TestJavadocReport

      @Inject public TestJavadocReport(org.apache.maven.doxia.tools.SiteTool siteTool, org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager, ResourceResolver resourceResolver, org.eclipse.aether.RepositorySystem repoSystem, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.apache.maven.project.ProjectBuilder mavenProjectBuilder, org.apache.maven.toolchain.ToolchainManager toolchainManager)
  • Method Details

    • executeReport

      protected void executeReport(Locale unusedLocale) throws org.apache.maven.reporting.MavenReportException
      Description copied from class: AbstractJavadocMojo
      The package documentation details the Javadoc Options used by this Plugin.
      Overrides:
      executeReport in class AbstractJavadocMojo
      Parameters:
      unusedLocale - the wanted locale (actually unused).
      Throws:
      org.apache.maven.reporting.MavenReportException - if any
    • getName

      public String getName(Locale locale)
      Description copied from class: JavadocReport
      Specified by:
      getName in interface org.apache.maven.reporting.MavenReport
      Overrides:
      getName in class JavadocReport
    • getDescription

      public String getDescription(Locale locale)
      Description copied from class: JavadocReport
      Specified by:
      getDescription in interface org.apache.maven.reporting.MavenReport
      Overrides:
      getDescription in class JavadocReport
    • getProjectBuildOutputDirs

      protected List<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 to the javadoc classpath.
    • getProjectSourceRoots

      protected List<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 List<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
    • getJavadocDirectory

      protected File getJavadocDirectory()
      Overrides:
      getJavadocDirectory in class AbstractJavadocMojo
      Returns:
      the current javadoc directory
    • getDoctitle

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

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

      protected String getWindowtitle()
      Overrides:
      getWindowtitle in class AbstractJavadocMojo
      Returns:
      the title to be placed in the HTML title tag
    • getDependencyScopeFilter

      protected org.eclipse.aether.util.filter.ScopeDependencyFilter getDependencyScopeFilter()
      Overrides:
      getDependencyScopeFilter in class AbstractJavadocMojo
    • getBundle

      private ResourceBundle getBundle(Locale locale)
      Gets the resource bundle for the specified locale.
      Parameters:
      locale - The locale of the currently generated report.
      Returns:
      The resource bundle for the requested locale.
    • addMainJavadocLink

      private void addMainJavadocLink()
      Add the ../apidocs to the links parameter so Test report could be linked to the Main report.
    • configureDependencySourceResolution

      protected SourceResolverConfig configureDependencySourceResolution(SourceResolverConfig config)
      Overridden to enable the resolution of -test-sources jar files. Override this method to customize the configuration for resolving dependency sources. The default behavior enables the resolution of -sources jar files.
      Overrides:
      configureDependencySourceResolution in class AbstractJavadocMojo
      Parameters:
      config - SourceResolverConfig
      Returns:
      SourceResolverConfig
    • 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.