@Mojo(name="check",
defaultPhase=COMPILE,
threadSafe=true,
requiresDependencyResolution=RUNTIME_PLUS_SYSTEM,
requiresOnline=true)
public class DependencyCheckMojo
extends ReportAggregationMojo
| Constructor and Description |
|---|
DependencyCheckMojo()
Constructs a new dependency-check-mojo.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canGenerateAggregateReport()
Returns whether or not an aggregate report can be generated.
|
protected boolean |
canGenerateNonAggregateReport()
Returns whether or not a non-aggregate report can be generated.
|
boolean |
canGenerateReport()
Returns whether or not a report can be generated.
|
protected void |
executeAggregateReport(org.apache.maven.project.MavenProject project,
Locale locale)
Generates the aggregate Site Report.
|
protected void |
executeNonAggregateReport(Locale locale)
Generates the Dependency-Check Site Report.
|
String |
getCategoryName()
Returns the category name.
|
String |
getDescription(Locale locale)
Gets the description of the Dependency-Check report to be displayed in the Maven Generated Reports page.
|
String |
getName(Locale locale)
Returns the report name.
|
String |
getOutputName()
Returns the output name.
|
protected void |
performExecute()
Executes the dependency-check and generates the report.
|
protected void |
postExecute()
Runs after the mojo has executed.
|
protected void |
postGenerate()
Executes after the site report has been generated.
|
protected List<Dependency> |
readDataFile()
Reads the serialized scan data from disk.
|
protected List<Dependency> |
readDataFile(org.apache.maven.project.MavenProject project)
Reads the serialized scan data from disk.
|
protected File |
writeDataFile()
Writes the scan data to disk.
|
execute, generate, generate, getAllChildDataFiles, getAllChildren, getAllChildren, getDataFileContextKey, getDataFileName, getDataFiles, getOutputDirectoryContextKey, getProject, getReportOutputDirectory, getReportOutputDirectory, isAggregate, isExternalReport, isLastProject, isMultiModule, isMultiModule, preExecute, preGenerate, setReportOutputDirectorypublic DependencyCheckMojo()
protected void performExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
performExecute in class ReportAggregationMojoorg.apache.maven.plugin.MojoExecutionException - if a maven exception occursorg.apache.maven.plugin.MojoFailureException - thrown if a CVSS score is found that is higher then the configured levelprotected void postExecute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
ReportAggregationMojowriteDataFile(). As such, it is
important that if this method is overriden that super.postExecute() is called.postExecute in class ReportAggregationMojoorg.apache.maven.plugin.MojoExecutionException - thrown if there is an issue executing the mojoorg.apache.maven.plugin.MojoFailureException - thrown if there is an issue executing the mojoprotected void postGenerate()
throws org.apache.maven.reporting.MavenReportException
ReportAggregationMojopostGenerate in class ReportAggregationMojoorg.apache.maven.reporting.MavenReportException - if a maven report exception occursprotected void executeNonAggregateReport(Locale locale) throws org.apache.maven.reporting.MavenReportException
executeNonAggregateReport in class ReportAggregationMojolocale - the locale to use when generating the reportorg.apache.maven.reporting.MavenReportException - if a maven report exception occursprotected void executeAggregateReport(org.apache.maven.project.MavenProject project,
Locale locale)
throws org.apache.maven.reporting.MavenReportException
ReportAggregationMojoexecuteAggregateReport in class ReportAggregationMojoproject - the maven project used to generate the aggregate reportlocale - the locale to use when generating the reportorg.apache.maven.reporting.MavenReportException - if a maven report exception occurspublic String getOutputName()
public String getCategoryName()
public String getName(Locale locale)
locale - the locationpublic String getDescription(Locale locale)
locale - The Locale to get the description forpublic boolean canGenerateReport()
true if a report can be generated; otherwise falseprotected boolean canGenerateNonAggregateReport()
canGenerateNonAggregateReport in class ReportAggregationMojotrue if a non-aggregate report can be generated; otherwise falseprotected boolean canGenerateAggregateReport()
canGenerateAggregateReport in class ReportAggregationMojotrue if an aggregate report can be generated; otherwise falseprotected File writeDataFile()
writeDataFile in class ReportAggregationMojoprotected List<Dependency> readDataFile()
Engine object populated with dependencies if the serialized data file exists; otherwise
null is returnedprotected List<Dependency> readDataFile(org.apache.maven.project.MavenProject project)
project - the Maven project to read the data file fromEngine object populated with dependencies if the serialized data file exists; otherwise
null is returnedCopyright© 2012-14 Jeremy Long. All Rights Reserved.