Class JxrReport

  • 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:
    AggregatorJxrReport, JxrNoForkReport

    @Mojo(name="jxr")
    @Execute(phase=GENERATE_SOURCES)
    public class JxrReport
    extends AbstractJxrReport
    Creates an html-based, cross referenced version of Java source code for a project.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String destDir
      Directory where the Xref files will be copied to.
      private java.io.File javadocDir
      Directory where Javadoc is generated for this project.
      private java.util.List<java.lang.String> sourceDirs
      Source directories of the project.
      private java.lang.String sourcePath
      Specifies the source path where the java files are located.
      • Fields inherited from class org.apache.maven.reporting.AbstractMavenReport

        locale, mojoExecution, outputDirectory, outputFormat, outputTimestamp, project, remoteProjectRepositories, repoSession, siteDirectory, siteRenderer, siteTool
      • Fields inherited from interface org.apache.maven.reporting.MavenReport

        CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      JxrReport()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription​(java.util.Locale locale)  
      protected java.lang.String getDestinationDirectory()
      Abstract method that returns the target directory where the generated JXR reports will be put.
      protected java.io.File getJavadocDir()
      Abstract method that returns the directory of the javadoc files.
      java.lang.String getName​(java.util.Locale locale)  
      java.lang.String getOutputName()  
      protected java.util.List<java.lang.String> getSourceRoots()
      Abstract method that returns the specified source directories that will be included in the JXR report generation.
      protected java.util.List<java.lang.String> getSourceRoots​(org.apache.maven.project.MavenProject project)
      Abstract method that returns the compile source directories of the specified project that will be included in the JXR report generation
      void setReportOutputDirectory​(java.io.File reportOutputDirectory)  
      • Methods inherited from class org.apache.maven.reporting.AbstractMavenReport

        closeReport, constructXrefLocation, execute, generate, generate, getCategoryName, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, getXrefLocation
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.maven.reporting.MavenReport

        getOutputPath
    • Field Detail

      • sourceDirs

        @Parameter(defaultValue="${project.compileSourceRoots}",
                   required=true,
                   readonly=true)
        private java.util.List<java.lang.String> sourceDirs
        Source directories of the project.
      • sourcePath

        @Parameter
        private java.lang.String sourcePath
        Specifies the source path where the java files are located. The paths are separated by ';'.
      • destDir

        @Parameter(defaultValue="${project.reporting.outputDirectory}/xref")
        private java.lang.String destDir
        Directory where the Xref files will be copied to.
      • javadocDir

        @Parameter(defaultValue="${project.reporting.outputDirectory}/apidocs")
        private java.io.File javadocDir
        Directory where Javadoc is generated for this project.
    • Constructor Detail

      • JxrReport

        public JxrReport()
    • Method Detail

      • getDestinationDirectory

        protected java.lang.String getDestinationDirectory()
        Description copied from class: AbstractJxrReport
        Abstract method that returns the target directory where the generated JXR reports will be put.
        Specified by:
        getDestinationDirectory in class AbstractJxrReport
        Returns:
        a String that contains the target directory name
      • getSourceRoots

        protected java.util.List<java.lang.String> getSourceRoots()
        Description copied from class: AbstractJxrReport
        Abstract method that returns the specified source directories that will be included in the JXR report generation.
        Specified by:
        getSourceRoots in class AbstractJxrReport
        Returns:
        a List of the source directories
      • getSourceRoots

        protected java.util.List<java.lang.String> getSourceRoots​(org.apache.maven.project.MavenProject project)
        Description copied from class: AbstractJxrReport
        Abstract method that returns the compile source directories of the specified project that will be included in the JXR report generation
        Specified by:
        getSourceRoots in class AbstractJxrReport
        Parameters:
        project - the MavenProject where the JXR report plugin will be executed
        Returns:
        a List of the source directories
      • getDescription

        public java.lang.String getDescription​(java.util.Locale locale)
      • getName

        public java.lang.String getName​(java.util.Locale locale)
      • getOutputName

        public java.lang.String getOutputName()
      • getJavadocDir

        protected java.io.File getJavadocDir()
        Description copied from class: AbstractJxrReport
        Abstract method that returns the directory of the javadoc files.
        Specified by:
        getJavadocDir in class AbstractJxrReport
        Returns:
        a File for the directory of the javadocs
      • setReportOutputDirectory

        public void setReportOutputDirectory​(java.io.File reportOutputDirectory)
        Specified by:
        setReportOutputDirectory in interface org.apache.maven.reporting.MavenReport
        Overrides:
        setReportOutputDirectory in class org.apache.maven.reporting.AbstractMavenReport