mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 17:41:28 +01:00
added nexus configuration options
Former-commit-id: a1c80659cd5c8879665504a016d772b95f117c4e
This commit is contained in:
@@ -82,9 +82,7 @@ public class App {
|
|||||||
if (cli.isGetVersion()) {
|
if (cli.isGetVersion()) {
|
||||||
cli.printVersionInfo();
|
cli.printVersionInfo();
|
||||||
} else if (cli.isRunScan()) {
|
} else if (cli.isRunScan()) {
|
||||||
updateSettings(cli.isAutoUpdate(), cli.getConnectionTimeout(), cli.getProxyUrl(),
|
updateSettings(cli);
|
||||||
cli.getProxyPort(), cli.getProxyUsername(), cli.getProxyPassword(),
|
|
||||||
cli.getDataDirectory(), cli.getPropertiesFile(), cli.getSuppressionFile());
|
|
||||||
runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles());
|
runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles());
|
||||||
} else {
|
} else {
|
||||||
cli.printHelp();
|
cli.printHelp();
|
||||||
@@ -146,9 +144,19 @@ public class App {
|
|||||||
* @param propertiesFile the properties file to utilize
|
* @param propertiesFile the properties file to utilize
|
||||||
* @param suppressionFile the path to the suppression file
|
* @param suppressionFile the path to the suppression file
|
||||||
*/
|
*/
|
||||||
private void updateSettings(boolean autoUpdate, String connectionTimeout, String proxyUrl, String proxyPort,
|
private void updateSettings(CliParser cli) {
|
||||||
String proxyUser, String proxyPass, String dataDirectory, File propertiesFile,
|
|
||||||
String suppressionFile) {
|
boolean autoUpdate = cli.isAutoUpdate();
|
||||||
|
String connectionTimeout = cli.getConnectionTimeout();
|
||||||
|
String proxyUrl = cli.getProxyUrl();
|
||||||
|
String proxyPort = cli.getProxyPort();
|
||||||
|
String proxyUser = cli.getProxyUsername();
|
||||||
|
String proxyPass = cli.getProxyPassword();
|
||||||
|
String dataDirectory = cli.getDataDirectory();
|
||||||
|
File propertiesFile = cli.getPropertiesFile();
|
||||||
|
String suppressionFile = cli.getSuppressionFile();
|
||||||
|
boolean nexusDisabled = cli.isNexusDisabled();
|
||||||
|
String nexusUrl = cli.getNexusUrl();
|
||||||
|
|
||||||
if (propertiesFile != null) {
|
if (propertiesFile != null) {
|
||||||
try {
|
try {
|
||||||
@@ -194,5 +202,9 @@ public class App {
|
|||||||
if (suppressionFile != null && !suppressionFile.isEmpty()) {
|
if (suppressionFile != null && !suppressionFile.isEmpty()) {
|
||||||
Settings.setString(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
|
Settings.setString(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
|
||||||
}
|
}
|
||||||
|
Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, !nexusDisabled);
|
||||||
|
if (nexusUrl != null && !nexusUrl.isEmpty()) {
|
||||||
|
Settings.setString(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user