@Mojo(name="rat",
requiresDependencyResolution=TEST)
public class RatReportMojo
extends AbstractRatMojo
implements org.apache.maven.reporting.MavenReport
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DOT_HTML |
private org.apache.maven.artifact.factory.ArtifactFactory |
factory |
private org.apache.maven.artifact.repository.ArtifactRepository |
localRepository |
private java.io.File |
outputDirectory
Specifies the directory where the report will be generated
|
private org.apache.maven.artifact.resolver.ArtifactResolver |
resolver |
private org.apache.maven.doxia.siterenderer.Renderer |
siteRenderer |
skip| Constructor and Description |
|---|
RatReportMojo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canGenerateReport()
Returns, whether the report may be generated.
|
void |
execute()
Called from Maven to invoke the plugin.
|
void |
generate(org.codehaus.doxia.sink.Sink sink,
java.util.Locale locale)
Writes the report to the Doxia sink.
|
private java.util.ResourceBundle |
getBundle(java.util.Locale locale)
Returns the reports bundle
|
java.lang.String |
getCategoryName()
Returns the reports category name.
|
java.lang.String |
getDescription(java.util.Locale locale)
Returns the reports description.
|
java.lang.String |
getName(java.util.Locale locale)
Returns the reports name.
|
java.lang.String |
getOutputName()
Returns the reports file name.
|
private java.lang.String |
getRatVersion()
Searches for a Rat artifact in the dependency list and returns its version.
|
java.io.File |
getReportOutputDirectory()
Returns the reports output directory.
|
private org.apache.maven.artifact.Artifact |
getSkinArtifactFile()
Returns the skins artifact file.
|
boolean |
isExternalReport()
Returns, whether this is an external report.
|
void |
setReportOutputDirectory(java.io.File pOutputDirectory)
Sets the reports output directory.
|
createReport, createReport, getConfiguration, getProject, getResourcespublic static final java.lang.String DOT_HTML
@Component private org.apache.maven.doxia.siterenderer.Renderer siteRenderer
@Component private org.apache.maven.artifact.factory.ArtifactFactory factory
@Component private org.apache.maven.artifact.resolver.ArtifactResolver resolver
@Parameter(defaultValue="${project.reporting.outputDirectory}",
required=true)
private java.io.File outputDirectory
@Parameter(defaultValue="${localRepository}",
required=true,
readonly=true)
private org.apache.maven.artifact.repository.ArtifactRepository localRepository
private org.apache.maven.artifact.Artifact getSkinArtifactFile()
throws org.apache.maven.plugin.MojoFailureException,
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException - An error in the plugin configuration was detected.org.apache.maven.plugin.MojoExecutionException - An error occurred while searching for the artifact file.public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoFailureException - An error in the plugin configuration was detected.org.apache.maven.plugin.MojoExecutionException - An error occurred while creating the report.public boolean canGenerateReport()
canGenerateReport in interface org.apache.maven.reporting.MavenReportprivate java.lang.String getRatVersion()
public void generate(org.codehaus.doxia.sink.Sink sink,
java.util.Locale locale)
throws org.apache.maven.reporting.MavenReportException
generate in interface org.apache.maven.reporting.MavenReportsink - The doxia sink, kind of a SAX handler.locale - The locale to use for writing the report.org.apache.maven.reporting.MavenReportException - Writing the report failed.public java.lang.String getCategoryName()
getCategoryName in interface org.apache.maven.reporting.MavenReportMavenReport.CATEGORY_PROJECT_REPORTSprivate java.util.ResourceBundle getBundle(java.util.Locale locale)
locale - Requested locale of the bundlepublic java.lang.String getDescription(java.util.Locale locale)
getDescription in interface org.apache.maven.reporting.MavenReportlocale - Requested locale of the bundlepublic java.lang.String getName(java.util.Locale locale)
getName in interface org.apache.maven.reporting.MavenReportlocale - Requested locale of the bundlepublic java.lang.String getOutputName()
getOutputName in interface org.apache.maven.reporting.MavenReportpublic java.io.File getReportOutputDirectory()
getReportOutputDirectory in interface org.apache.maven.reporting.MavenReportpublic boolean isExternalReport()
isExternalReport in interface org.apache.maven.reporting.MavenReportpublic void setReportOutputDirectory(java.io.File pOutputDirectory)
setReportOutputDirectory in interface org.apache.maven.reporting.MavenReportpOutputDirectory - Reports target directory.