Class UpdateMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.owasp.dependencycheck.maven.BaseDependencyCheckMojo
org.owasp.dependencycheck.maven.UpdateMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenReport
@Mojo(name="update-only",
requiresProject=false,
defaultPhase=GENERATE_RESOURCES,
threadSafe=true,
requiresDependencyResolution=NONE,
requiresOnline=true,
aggregator=true)
public class UpdateMojo
extends BaseDependencyCheckMojo
Maven Plugin that updates the local cache of the NVD data from NIST.
- 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 false; this mojo cannot generate a report.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 voidrunCheck()Executes the dependency-check engine on the project's dependencies and generates the report.protected ExceptionCollectionscanDependencies(Engine engine) Throws an exception if called.protected ExceptionCollectionscanPlugins(Engine engine, ExceptionCollection exCollection) Throws an exception if called.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, 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
-
UpdateMojo
public UpdateMojo()
-
-
Method Details
-
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.MojoFailureExceptionExecutes the dependency-check engine on the project's dependencies and generates the report.- 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
-
getDescription
-
scanDependencies
protected ExceptionCollection scanDependencies(Engine engine) throws org.apache.maven.plugin.MojoExecutionException Throws an exception if called. The update 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
-