mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 17:41:28 +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)
|
@Parameter(property = "zipExtensions", required = false)
|
||||||
private String zipExtensions;
|
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.
|
* Skip Analysis for Test Scope Dependencies.
|
||||||
*/
|
*/
|
||||||
@@ -325,9 +331,13 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||||
validateAggregate();
|
if (skip) {
|
||||||
project.setContextValue(getOutputDirectoryContextKey(), this.outputDirectory);
|
getLog().info("Skipping " + getName(Locale.US));
|
||||||
runCheck();
|
} else {
|
||||||
|
validateAggregate();
|
||||||
|
project.setContextValue(getOutputDirectoryContextKey(), this.outputDirectory);
|
||||||
|
runCheck();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user