Skip to content
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.

Commit

Permalink
Support for "skip" configuration parameter in maven plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pmajkutewicz committed Sep 19, 2017
1 parent e769255 commit 0384891
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,27 @@ public class HuntBugsMojo extends AbstractMojo {
@Parameter( defaultValue = "${session}", readonly = true, required = true )
private MavenSession session;

@Parameter(property = "skip", defaultValue = "false")
private boolean skip;

@Component
private DependencyTreeBuilder treeBuilder;

@Override
public void execute() throws MojoExecutionException {
try {
Context ctx = new Context(constructRepository(), constructOptions());
if (!skip) {
try {
Context ctx = new Context(constructRepository(), constructOptions());

if (!quiet) {
addAnalysisProgressListener(ctx);
}
if (!quiet) {
addAnalysisProgressListener(ctx);
}

ctx.analyzePackage("");
writeReports(ctx);
} catch (Exception e) {
throw new MojoExecutionException("Failed to run HuntBugs", e);
ctx.analyzePackage("");
writeReports(ctx);
} catch (Exception e) {
throw new MojoExecutionException("Failed to run HuntBugs", e);
}
}
}

Expand Down

0 comments on commit 0384891

Please sign in to comment.