Class AbstractProjectInfoReport

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.apache.maven.report.projectinfo.AbstractProjectInfoReport
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:
CiManagementReport, DependenciesReport, DependencyConvergenceReport, DependencyInformationReport, DependencyManagementReport, DistributionManagementReport, IndexReport, IssueManagementReport, LicensesReport, MailingListsReport, ModulesReport, PluginManagementReport, PluginsReport, ScmReport, SummaryReport, TeamReport

public abstract class AbstractProjectInfoReport extends org.apache.maven.reporting.AbstractMavenReport
Base class with the things that should be in AbstractMavenReport anyway.
Since:
2.0
Author:
Brett Porter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    Path for a custom bundle instead of using the default one.
    protected List<org.apache.maven.artifact.repository.ArtifactRepository>
    Plugin repositories used for the project.
    protected final org.apache.maven.project.ProjectBuilder
     
    protected List<org.apache.maven.artifact.repository.ArtifactRepository>
     
    protected org.apache.maven.settings.Settings
    The current user system settings for use in Maven.
    protected boolean
    Skip the project info report generation if a report-specific section of the POM is empty.

    Fields inherited from class org.apache.maven.reporting.AbstractMavenReport

    locale, mojoExecution, outputDirectory, outputFormat, outputTimestamp, project, reactorProjects, 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
    Modifier
    Constructor
    Description
    protected
    AbstractProjectInfoReport(org.apache.maven.repository.RepositorySystem repositorySystem, org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.project.ProjectBuilder projectBuilder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
    protected org.codehaus.plexus.i18n.I18N
    getI18N(Locale locale)
     
    protected abstract String
     
    protected String
    getI18nString(Locale locale, String key)
     
    protected Map<String,String>
     
    protected org.apache.maven.plugin.MojoExecution
     
    getName(Locale locale)
    protected org.apache.maven.model.Plugin
    getPlugin(String pluginId)
     
    protected String
    getPluginParameter(String pluginId, String param)
     
    protected List<org.apache.maven.project.MavenProject>
     
    protected org.apache.maven.execution.MavenSession
     
    protected boolean
     

    Methods inherited from class org.apache.maven.reporting.AbstractMavenReport

    closeReport, constructXrefLocation, execute, executeReport, generate, generate, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getProject, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, getXrefLocation, isExternalReport, setReportOutputDirectory

    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

    getOutputName, getOutputPath
  • Field Details

    • remoteRepositories

      @Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true, required=true) protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories
    • pluginRepositories

      @Parameter(defaultValue="${project.pluginArtifactRepositories}", readonly=true, required=true) protected List<org.apache.maven.artifact.repository.ArtifactRepository> pluginRepositories
      Plugin repositories used for the project.
      Since:
      3.1.0
    • settings

      @Parameter(defaultValue="${settings}", readonly=true, required=true) protected org.apache.maven.settings.Settings settings
      The current user system settings for use in Maven.
      Since:
      2.3
    • customBundle

      @Parameter(defaultValue="${project.basedir}/src/site/custom/project-info-reports.properties") protected String customBundle
      Path for a custom bundle instead of using the default one.
      Using this field, you could change the texts in the generated reports.
      Since:
      2.3
    • skipEmptyReport

      @Parameter(defaultValue="true") protected boolean skipEmptyReport
      Skip the project info report generation if a report-specific section of the POM is empty. Defaults to true.
      Since:
      2.8
    • projectBuilder

      protected final org.apache.maven.project.ProjectBuilder projectBuilder
  • Constructor Details

    • AbstractProjectInfoReport

      protected AbstractProjectInfoReport(org.apache.maven.repository.RepositorySystem repositorySystem, org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.project.ProjectBuilder projectBuilder)
  • Method Details

    • canGenerateReport

      public boolean canGenerateReport() throws org.apache.maven.reporting.MavenReportException
      Specified by:
      canGenerateReport in interface org.apache.maven.reporting.MavenReport
      Overrides:
      canGenerateReport in class org.apache.maven.reporting.AbstractMavenReport
      Throws:
      org.apache.maven.reporting.MavenReportException
    • getCategoryName

      public String getCategoryName()
      Specified by:
      getCategoryName in interface org.apache.maven.reporting.MavenReport
      Overrides:
      getCategoryName in class org.apache.maven.reporting.AbstractMavenReport
    • getLicenseMappings

      protected Map<String,String> getLicenseMappings()
    • isEmpty

      protected boolean isEmpty(Collection<?> coll)
      Parameters:
      coll - The collection to be checked.
      Returns:
      true if coll is empty false otherwise.
    • getSession

      protected org.apache.maven.execution.MavenSession getSession()
    • getReactorProjects

      protected List<org.apache.maven.project.MavenProject> getReactorProjects()
    • getMojoExecution

      protected org.apache.maven.plugin.MojoExecution getMojoExecution()
    • getPlugin

      protected org.apache.maven.model.Plugin getPlugin(String pluginId)
      Parameters:
      pluginId - The id of the plugin
      Returns:
      The information about the plugin
    • getPluginParameter

      protected String getPluginParameter(String pluginId, String param)
      Parameters:
      pluginId - the pluginId
      param - the child which should be checked
      Returns:
      the value of the dom tree
    • getI18nString

      protected String getI18nString(Locale locale, String key)
      Parameters:
      locale - The locale
      key - The key to search for
      Returns:
      The text appropriate for the locale.
    • getI18N

      protected org.codehaus.plexus.i18n.I18N getI18N(Locale locale)
      Parameters:
      locale - The local.
      Returns:
      I18N for the locale
    • getI18Nsection

      protected abstract String getI18Nsection()
      Returns:
      The according string for the section.
    • getName

      public String getName(Locale locale)
    • getDescription

      public String getDescription(Locale locale)