Class CheckMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.owasp.dependencycheck.maven.BaseDependencyCheckMojo
org.owasp.dependencycheck.maven.CheckMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport
@Mojo(name="check",
defaultPhase=VERIFY,
threadSafe=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
requiresOnline=true)
public class CheckMojo
extends BaseDependencyCheckMojo
Maven Plugin that checks the project dependencies to see if they have any
known published vulnerabilities.
- Author:
- Jeremy Long
-
Field Summary
Fields inherited from class BaseDependencyCheckMojo
PROTOCOL_HTTP, PROTOCOL_HTTPSFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether or not a the report can be generated.getDescription(Locale locale) Gets the description of the Dependency-Check report to be displayed in the Maven Generated Reports page.Returns the report name.protected ExceptionCollectionscanDependencies(Engine engine) Scans the dependencies of the project.protected ExceptionCollectionscanPlugins(Engine engine, ExceptionCollection exCollection) Scans the plugins of the project.Methods inherited from class BaseDependencyCheckMojo
checkForFailure, createProjectReferenceName, execute, generate, getArtifactScopeExcluded, getCategoryName, getConnectionString, getCorrectOutputDirectory, getCorrectOutputDirectory, getExcludes, getOutputDirectory, getOutputName, getProject, getReactorProjects, getReportOutputDirectory, getSettings, initializeEngine, isExternalReport, isFailOnError, isGeneratingSite, newResolveArtifactProjectBuildingRequest, populateSettings, resolveArtifactDependencies, runCheck, scanArtifacts, scanArtifacts, scanPlugins, setReportOutputDirectory, showSummaryMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.reporting.MavenReport
getOutputPath
-
Constructor Details
-
CheckMojo
public CheckMojo()
-
-
Method Details
-
canGenerateReport
public boolean canGenerateReport()Returns whether or not a the report can be generated.- Returns:
trueif the report can be generated; otherwisefalse
-
getName
-
getDescription
-
scanDependencies
protected ExceptionCollection scanDependencies(Engine engine) throws org.apache.maven.plugin.MojoExecutionException Scans the dependencies of the project.- Specified by:
scanDependenciesin classBaseDependencyCheckMojo- Parameters:
engine- the engine used to perform the scanning- Returns:
- a collection of exceptions
- Throws:
org.apache.maven.plugin.MojoExecutionException- thrown if a fatal exception occurs
-
scanPlugins
protected ExceptionCollection scanPlugins(Engine engine, ExceptionCollection exCollection) throws org.apache.maven.plugin.MojoExecutionException Scans the plugins of the project.- Specified by:
scanPluginsin classBaseDependencyCheckMojo- Parameters:
engine- the engine used to perform the scanningexCollection- the collection of exceptions that might have occurred previously- Returns:
- a collection of exceptions
- Throws:
org.apache.maven.plugin.MojoExecutionException- thrown if a fatal exception occurs
-