added the ability to disable the Central Analyzer (issue #175)

Former-commit-id: e56475fdf3dc94ea60b7acf8badd6a23197881d5
This commit is contained in:
Jeremy Long
2014-12-28 09:12:22 -05:00
parent c8d77eb213
commit f2ad8cc7d1

View File

@@ -195,14 +195,22 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
@Parameter(property = "nuspecAnalyzerEnabled", defaultValue = "true", required = false)
private boolean nuspecAnalyzerEnabled = true;
/**
* Whether or not the Central Analyzer is enabled.
*/
@SuppressWarnings("CanBeFinal")
@Parameter(property = "centralAnalyzerEnabled", defaultValue = "true", required = false)
private boolean centralAnalyzerEnabled = true;
/**
* Whether or not the Nexus Analyzer is enabled.
*/
@SuppressWarnings("CanBeFinal")
@Parameter(property = "nexusAnalyzerEnabled", defaultValue = "true", required = false)
private boolean nexusAnalyzerEnabled = true;
/**
* Whether or not the Nexus Analyzer is enabled.
* The URL of a Nexus Pro server.
*/
@Parameter(property = "nexusUrl", defaultValue = "", required = false)
private String nexusUrl;
@@ -584,6 +592,8 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
//NUSPEC ANALYZER
Settings.setBoolean(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, nuspecAnalyzerEnabled);
//NEXUS ANALYZER
Settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
//NEXUS ANALYZER
Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
if (nexusUrl != null && !nexusUrl.isEmpty()) {
Settings.setString(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);