Package org.owasp.dependencycheck.maven
Class PurgeMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.owasp.dependencycheck.maven.BaseDependencyCheckMojo
-
- org.owasp.dependencycheck.maven.PurgeMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,org.apache.maven.reporting.MavenReport
@Mojo(name="purge", defaultPhase=GENERATE_RESOURCES, requiresProject=false, threadSafe=true, requiresDependencyResolution=NONE, requiresOnline=true, aggregator=true) public class PurgeMojo extends BaseDependencyCheckMojoMaven Plugin that purges the local copy of the NVD data.- Author:
- Jeremy Long
-
-
Field Summary
-
Fields inherited from class org.owasp.dependencycheck.maven.BaseDependencyCheckMojo
PROTOCOL_HTTP, PROTOCOL_HTTPS
-
-
Constructor Summary
Constructors Constructor Description PurgeMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanGenerateReport()Returns false; this mojo cannot generate a report.java.lang.StringgetDescription(java.util.Locale locale)Gets the description of the Dependency-Check report to be displayed in the Maven Generated Reports page.java.lang.StringgetName(java.util.Locale locale)Returns the report name.protected voidrunCheck()Purges the local copy of the NVD.protected ExceptionCollectionscanDependencies(Engine engine)Throws an exception if called.protected ExceptionCollectionscanPlugins(Engine engine, ExceptionCollection exCollection)Throws an exception if called.-
Methods inherited from class org.owasp.dependencycheck.maven.BaseDependencyCheckMojo
checkForFailure, createProjectReferenceName, execute, generate, getArtifactScopeExcluded, getCategoryName, getConnectionString, getCorrectOutputDirectory, getCorrectOutputDirectory, getExcludes, getOutputDirectory, getOutputName, getProject, getReactorProjects, getReportOutputDirectory, getSettings, initializeEngine, isExternalReport, isFailOnError, isGeneratingSite, newResolveArtifactProjectBuildingRequest, populateSettings, resolveArtifactDependencies, scanArtifacts, scanArtifacts, scanPlugins, setReportOutputDirectory, showSummary
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Method Detail
-
canGenerateReport
public boolean canGenerateReport()
Returns false; this mojo cannot generate a report.- Returns:
false
-
runCheck
protected void runCheck() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionPurges the local copy of the NVD.- Overrides:
runCheckin classBaseDependencyCheckMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- thrown if there is an exception executing the goalorg.apache.maven.plugin.MojoFailureException- thrown if dependency-check is configured to fail the build
-
getName
public java.lang.String getName(java.util.Locale locale)
Returns the report name.- Parameters:
locale- the location- Returns:
- the report name
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
Gets the description of the Dependency-Check report to be displayed in the Maven Generated Reports page.- Parameters:
locale- The Locale to get the description for- Returns:
- the description
-
scanDependencies
protected ExceptionCollection scanDependencies(Engine engine) throws org.apache.maven.plugin.MojoExecutionException
Throws an exception if called. The purge mojo does not scan dependencies.- Specified by:
scanDependenciesin classBaseDependencyCheckMojo- Parameters:
engine- the engine used to scan- Returns:
- a collection of exceptions
- Throws:
org.apache.maven.plugin.MojoExecutionException- thrown if there is an exception
-
scanPlugins
protected ExceptionCollection scanPlugins(Engine engine, ExceptionCollection exCollection) throws org.apache.maven.plugin.MojoExecutionException
Throws an exception if called. The purge mojo does not scan dependencies.- Specified by:
scanPluginsin classBaseDependencyCheckMojo- Parameters:
engine- the engine used to scanexCollection- the collection of exceptions that might have occurred previously- Returns:
- a collection of exceptions
- Throws:
org.apache.maven.plugin.MojoExecutionException- thrown if there is an exception
-
-