Package org.codehaus.mojo.versions
Class AbstractPluginUpdatesReport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.codehaus.mojo.versions.AbstractVersionsReport<PluginUpdatesModel>
org.codehaus.mojo.versions.AbstractPluginUpdatesReport
- 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:
PluginUpdatesAggregateReport,PluginUpdatesReport
public abstract class AbstractPluginUpdatesReport
extends AbstractVersionsReport<PluginUpdatesModel>
Generates a report of available updates for the plugins of a project.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIftrue, only shows the subsection of thepluginManagementartifacts that are actually used in the project'splugingraph.protected booleanIftrue, only shows upgradable plugins in the report.Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsReport
allowSnapshots, artifactHandlerManager, comparisonMethod, i18n, ignoredVersions, rendererFactory, repositorySystem, ruleSet, session, wagonMapFields inherited from class org.apache.maven.reporting.AbstractMavenReport
locale, mojoExecution, outputDirectory, outputFormat, outputTimestamp, project, reactorProjects, remoteProjectRepositories, repoSession, siteDirectory, siteRenderer, siteToolFields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLEFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPluginUpdatesReport(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 TypeMethodDescriptionbooleanprotected voiddoGenerateReport(Locale locale, org.apache.maven.doxia.sink.Sink sink) generates an empty report in case there are no sources to generate a report withprotected booleanhaveBuildPluginManagementPlugins(org.apache.maven.project.MavenProject project) protected booleanhaveBuildPlugins(org.apache.maven.project.MavenProject project) booleanprotected abstract voidpopulatePluginManagement(Set<org.apache.maven.model.Plugin> pluginManagementCollector) Implementations ofAbstractPluginUpdatesReportmay use this to supply the main processing logic with desired pluginManagement data, which will be used in the creation of the report.protected abstract voidpopulatePlugins(Set<org.apache.maven.model.Plugin> pluginsCollector) Implementations ofAbstractPluginUpdatesReportmay use this to supply the main processing logic with desired build plugin information, which will be used to create the report.Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsReport
executeReport, getAllowSnapshots, getComparisonMethod, getDescription, getHelper, getI18n, getName, getTextMethods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, constructXrefLocation, execute, generate, generate, getCategoryName, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getProject, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, getXrefLocation, setReportOutputDirectoryMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.reporting.MavenReport
getOutputName, getOutputPath
-
Field Details
-
onlyProjectPlugins
@Parameter(property="onlyProjectPlugins", defaultValue="false") protected boolean onlyProjectPluginsIftrue, only shows the subsection of thepluginManagementartifacts that are actually used in the project'splugingraph.falseby default.- Since:
- 2.12
-
onlyUpgradable
@Parameter(property="onlyUpgradable", defaultValue="false") protected boolean onlyUpgradableIftrue, only shows upgradable plugins in the report.falseby default.- Since:
- 2.12
-
-
Constructor Details
-
AbstractPluginUpdatesReport
protected AbstractPluginUpdatesReport(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:
isExternalReportin interfaceorg.apache.maven.reporting.MavenReport- Overrides:
isExternalReportin classorg.apache.maven.reporting.AbstractMavenReport
-
canGenerateReport
public boolean canGenerateReport()- Specified by:
canGenerateReportin interfaceorg.apache.maven.reporting.MavenReport- Overrides:
canGenerateReportin classorg.apache.maven.reporting.AbstractMavenReport
-
haveBuildPluginManagementPlugins
protected boolean haveBuildPluginManagementPlugins(org.apache.maven.project.MavenProject project) -
haveBuildPlugins
protected boolean haveBuildPlugins(org.apache.maven.project.MavenProject project) -
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:
doGenerateReportin classAbstractVersionsReport<PluginUpdatesModel>- Parameters:
locale- the locale to generate the report for.sink- the report formatting tool- Throws:
org.apache.maven.reporting.MavenReportException- when things go wrong.
-
populatePluginManagement
protected abstract void populatePluginManagement(Set<org.apache.maven.model.Plugin> pluginManagementCollector) Implementations ofAbstractPluginUpdatesReportmay use this to supply the main processing logic with desired pluginManagement data, which will be used in the creation of the report.- Parameters:
pluginManagementCollector- , a set initialized with aPluginComparatorcomparator.
-
populatePlugins
Implementations ofAbstractPluginUpdatesReportmay use this to supply the main processing logic with desired build plugin information, which will be used to create the report.- Parameters:
pluginsCollector- , a set initialized with aPluginComparatorcomparator.
-