org.codehaus.mojo.versions
Class AbstractVersionsReport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.codehaus.mojo.versions.AbstractVersionsReport
- All Implemented Interfaces:
- ContextEnabled, Mojo, MavenReport
- Direct Known Subclasses:
- DependencyUpdatesReport, DisplayDependencyUpdatesReport, SimpleReport
public abstract class AbstractVersionsReport
- extends AbstractMavenReport
Base class for all versions reports.
- Since:
- 1.0-alpha-3
- Author:
- Stephen Connolly
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
artifactMetadataSource
protected ArtifactMetadataSource artifactMetadataSource
- The artifact metadata source to use.
- Since:
- 1.0-alpha-1
- Is a Plexus component defined by:
- Is readonly.
- Is required.
remoteArtifactRepositories
protected List remoteArtifactRepositories
- Since:
- 1.0-alpha-3
- Is defined by:
- expression:
- ${project.remoteArtifactRepositories}
- Is readonly.
remotePluginRepositories
protected List remotePluginRepositories
- Since:
- 1.0-alpha-3
- Is defined by:
- expression:
- ${project.pluginArtifactRepositories}
- Is readonly.
localRepository
protected ArtifactRepository localRepository
- Since:
- 1.0-alpha-1
- Is defined by:
- expression:
- ${localRepository}
- Is readonly.
comparisonMethod
protected String comparisonMethod
- The versioning rule to use when comparing versions. Valid values are
maven,
numeric which will handle long version numbers provided all components are numeric, or
mercury which will use the mercury version number comparison rules.
- Since:
- 1.0-alpha-1
- Is defined by:
- expression:
- ${comparisonMethod}
AbstractVersionsReport
public AbstractVersionsReport()
getHelper
public VersionsHelper getHelper()
throws MojoExecutionException
- Throws:
MojoExecutionException
executeReport
protected void executeReport(Locale locale)
throws MavenReportException
- Specified by:
executeReport in class AbstractMavenReport
- Throws:
MavenReportException
doGenerateReport
protected abstract void doGenerateReport(Locale locale,
org.apache.maven.doxia.sink.Sink sink)
- generates the report.
- Parameters:
locale - the locale to generate the report for.sink - the report formatting tool.
findLatestVersion
protected ArtifactVersion findLatestVersion(Artifact artifact,
VersionRange versionRange,
Boolean allowingSnapshots,
boolean usePluginRepositories)
throws MojoExecutionException
- Finds the latest version of the specified artifact that matches the version range.
- Parameters:
artifact - The artifact.versionRange - The version range.allowingSnapshots - null for no override, otherwise the local override to apply.
- Returns:
- The latest version of the specified artifact that matches the specified version range or
null if no matching version could be found.
- Throws:
MojoExecutionException - If the artifact metadata could not be found.- Since:
- 1.0-alpha-1
getProject
protected MavenProject getProject()
- Specified by:
getProject in class AbstractMavenReport
- See Also:
AbstractMavenReport.getProject()
getOutputDirectory
protected String getOutputDirectory()
- Specified by:
getOutputDirectory in class AbstractMavenReport
- See Also:
AbstractMavenReport.getOutputDirectory()
getSiteRenderer
protected org.apache.maven.doxia.siterenderer.Renderer getSiteRenderer()
- Specified by:
getSiteRenderer in class AbstractMavenReport
- See Also:
AbstractMavenReport.getSiteRenderer()
getDescription
public String getDescription(Locale locale)
- See Also:
MavenReport.getDescription(java.util.Locale)
getName
public String getName(Locale locale)
- See Also:
MavenReport.getName(java.util.Locale)
getText
public String getText(Locale locale,
String key)
- Gets the localized message for this report.
- Parameters:
locale - the locale.key - the message key.
- Returns:
- the message.
getAllowSnapshots
public Boolean getAllowSnapshots()
getComparisonMethod
public String getComparisonMethod()
getResolver
public ArtifactResolver getResolver()
Copyright © 2008-2009 Codehaus. All Rights Reserved.