Class JavadocReport

  • 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:
    AggregatorJavadocReport, JavadocNoForkReport, TestJavadocReport

    @Mojo(name="javadoc",
          requiresDependencyResolution=COMPILE,
          threadSafe=true)
    @Execute(phase=GENERATE_SOURCES)
    public class JavadocReport
    extends AbstractJavadocMojo
    implements org.apache.maven.reporting.MavenMultiPageReport
    Generates documentation for the Java code in a NON aggregator project using the standard Javadoc Tool.
    Since:
    2.0
    Author:
    Emmanuel Venisse, Vincent Siveton
    See Also:
    Javadoc Tool
    • Constructor Detail

      • JavadocReport

        public JavadocReport()
    • Method Detail

      • getName

        public String getName​(Locale locale)
        Specified by:
        getName in interface org.apache.maven.reporting.MavenReport
      • getDescription

        public String getDescription​(Locale locale)
        Specified by:
        getDescription in interface org.apache.maven.reporting.MavenReport
      • generate

        public void generate​(org.apache.maven.doxia.sink.Sink sink,
                             Locale locale)
                      throws org.apache.maven.reporting.MavenReportException
        Specified by:
        generate in interface org.apache.maven.reporting.MavenReport
        Throws:
        org.apache.maven.reporting.MavenReportException
      • generate

        public void generate​(org.apache.maven.doxia.sink.Sink sink,
                             org.apache.maven.doxia.sink.SinkFactory sinkFactory,
                             Locale locale)
                      throws org.apache.maven.reporting.MavenReportException
        Specified by:
        generate in interface org.apache.maven.reporting.MavenMultiPageReport
        Throws:
        org.apache.maven.reporting.MavenReportException
      • getOutputName

        public String getOutputName()
        Specified by:
        getOutputName in interface org.apache.maven.reporting.MavenReport
      • isExternalReport

        public boolean isExternalReport()
        Specified by:
        isExternalReport in interface org.apache.maven.reporting.MavenReport
      • canGenerateReport

        public boolean canGenerateReport()
                                  throws org.apache.maven.reporting.MavenReportException

        The logic is the following:
        Can-generate-report Matrix
        isAggregator hasSourceFiles isRootProject Generate Report
        True True True True
        True True False False
        True False True False
        True False False False
        False True True True
        False True False True
        False False True False
        False False False False
        Specified by:
        canGenerateReport in interface org.apache.maven.reporting.MavenReport
        Throws:
        org.apache.maven.reporting.MavenReportException
      • getCategoryName

        public String getCategoryName()
        Specified by:
        getCategoryName in interface org.apache.maven.reporting.MavenReport
      • getReportOutputDirectory

        public File getReportOutputDirectory()
        Specified by:
        getReportOutputDirectory in interface org.apache.maven.reporting.MavenReport
      • setReportOutputDirectory

        public void setReportOutputDirectory​(File reportOutputDirectory)
        Specified by:
        setReportOutputDirectory in interface org.apache.maven.reporting.MavenReport
      • doExecute

        protected void doExecute()
                          throws org.apache.maven.plugin.MojoExecutionException,
                                 org.apache.maven.plugin.MojoFailureException
        Specified by:
        doExecute in class AbstractJavadocMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException