Class AbstractDependencyUpdatesReport

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.codehaus.mojo.versions.AbstractVersionsReport<DependencyUpdatesModel>
org.codehaus.mojo.versions.AbstractDependencyUpdatesReport
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:
DependencyUpdatesAggregateReport, DependencyUpdatesReport

public abstract class AbstractDependencyUpdatesReport extends AbstractVersionsReport<DependencyUpdatesModel>
Generates a report of available updates for the dependencies of a project.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String[]
    Report formats (html and/or xml).
    protected boolean
    If true, only shows the subsection of the dependencyManagement artifacts that are actually used in the project's dependency graph.
    protected boolean
    If true, only shows upgradable dependencies in the report.
    protected boolean
    Whether to process the dependencyManagement in pom or not.
    protected boolean
    Whether to process the dependencyManagement part transitive or not.

    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
    AbstractDependencyUpdatesReport(org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String,org.apache.maven.wagon.Wagon> wagonMap, ReportRendererFactory rendererFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    protected void
    doGenerateReport(Locale locale, org.apache.maven.doxia.sink.Sink sink)
    generates an empty report in case there are no sources to generate a report with
    protected void
    handleDependencyManagementTransitive(org.apache.maven.project.MavenProject project, Set<org.apache.maven.model.Dependency> dependencyManagementCollector)
     
    protected boolean
    hasDependencyManagement(org.apache.maven.project.MavenProject project)
     
    boolean
    protected abstract void
    populateDependencies(Set<org.apache.maven.model.Dependency> dependenciesCollector)
    Implementations of AbstractDependencyUpdatesReport may use this to supply the main processing logic (see getDependencyManagement(Set)) with desired dependency data, which will be used in the creation of the report.
    protected abstract void
    populateDependencyManagement(Set<org.apache.maven.model.Dependency> dependencyManagementCollector, Set<org.apache.maven.model.Dependency> dependencies)
    Implementations of AbstractDependencyUpdatesReport may use this to supply the main processing logic (see getDependencyManagement(Set)) with desired managed dependencies data, which will be used in the creation of the report.

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

    closeReport, constructXrefLocation, execute, generate, generate, getCategoryName, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getProject, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, getXrefLocation, 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

    • processDependencyManagement

      @Parameter(property="processDependencyManagement", defaultValue="true") protected boolean processDependencyManagement
      Whether to process the dependencyManagement in pom or not.
      Since:
      2.5
    • processDependencyManagementTransitive

      @Parameter(property="processDependencyManagementTransitive", defaultValue="true") protected boolean processDependencyManagementTransitive
      Whether to process the dependencyManagement part transitive or not. In case of <type>pom</type>and <scope>import</scope> this means by default to report also the imported dependencies. If processTransitive is set to false the report will only show updates of the imported pom itself.
      Since:
      2.5 Note: Currently in experimental state.
    • formats

      @Parameter(property="dependencyUpdatesReportFormats", defaultValue="html") protected String[] formats
      Report formats (html and/or xml). HTML by default.
    • onlyProjectDependencies

      @Parameter(property="onlyProjectDependencies", defaultValue="false") protected boolean onlyProjectDependencies
      If true, only shows the subsection of the dependencyManagement artifacts that are actually used in the project's dependency graph. false by default.
      Since:
      2.12
    • onlyUpgradable

      @Parameter(property="onlyUpgradable", defaultValue="false") protected boolean onlyUpgradable
      If true, only shows upgradable dependencies in the report. false by default.
      Since:
      2.12
  • Constructor Details

    • AbstractDependencyUpdatesReport

      protected AbstractDependencyUpdatesReport(org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String,org.apache.maven.wagon.Wagon> wagonMap, ReportRendererFactory rendererFactory)
  • Method Details

    • isExternalReport

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

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

      protected void doGenerateReport(Locale locale, org.apache.maven.doxia.sink.Sink sink) throws org.apache.maven.reporting.MavenReportException
      generates an empty report in case there are no sources to generate a report with
      Specified by:
      doGenerateReport in class AbstractVersionsReport<DependencyUpdatesModel>
      Parameters:
      locale - the locale to generate the report for.
      sink - the report formatting tool
      Throws:
      org.apache.maven.reporting.MavenReportException - when things go wrong.
    • handleDependencyManagementTransitive

      protected void handleDependencyManagementTransitive(org.apache.maven.project.MavenProject project, Set<org.apache.maven.model.Dependency> dependencyManagementCollector)
    • populateDependencies

      protected abstract void populateDependencies(Set<org.apache.maven.model.Dependency> dependenciesCollector)
      Implementations of AbstractDependencyUpdatesReport may use this to supply the main processing logic (see getDependencyManagement(Set)) with desired dependency data, which will be used in the creation of the report.
      Parameters:
      dependenciesCollector - , a Set, initialized with a DependencyComparator comparator.
    • populateDependencyManagement

      protected abstract void populateDependencyManagement(Set<org.apache.maven.model.Dependency> dependencyManagementCollector, Set<org.apache.maven.model.Dependency> dependencies) throws org.apache.maven.reporting.MavenReportException
      Implementations of AbstractDependencyUpdatesReport may use this to supply the main processing logic (see getDependencyManagement(Set)) with desired managed dependencies data, which will be used in the creation of the report.
      Parameters:
      dependencyManagementCollector - , a Set initialized with a DependencyComparator
      dependencies - an already populated set of dependencies(non-managed) comparator.
      Throws:
      org.apache.maven.reporting.MavenReportException - when things go wrong.
    • hasDependencyManagement

      protected boolean hasDependencyManagement(org.apache.maven.project.MavenProject project)