mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
Added basic skip option for mojos.
This commit is contained in:
@@ -246,6 +246,12 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
*/
|
||||
@Parameter(property = "zipExtensions", required = false)
|
||||
private String zipExtensions;
|
||||
/**
|
||||
* Skip Dependency Check altogether.
|
||||
*/
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
@Parameter(property = "dependency-check.skip", defaultValue = "false", required = false)
|
||||
private boolean skip = false;
|
||||
/**
|
||||
* Skip Analysis for Test Scope Dependencies.
|
||||
*/
|
||||
@@ -325,9 +331,13 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
*/
|
||||
@Override
|
||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||
validateAggregate();
|
||||
project.setContextValue(getOutputDirectoryContextKey(), this.outputDirectory);
|
||||
runCheck();
|
||||
if (skip) {
|
||||
getLog().info("Skipping " + getName(Locale.US));
|
||||
} else {
|
||||
validateAggregate();
|
||||
project.setContextValue(getOutputDirectoryContextKey(), this.outputDirectory);
|
||||
runCheck();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user