mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 17:41:28 +01:00
updated to support the new Settings implementation
Former-commit-id: 455333dfde047ca2b92c80b60dbc905d7705cfb2
This commit is contained in:
@@ -82,7 +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);
|
populateSettings(cli);
|
||||||
runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles());
|
runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles());
|
||||||
} else {
|
} else {
|
||||||
cli.printHelp();
|
cli.printHelp();
|
||||||
@@ -135,6 +135,7 @@ public class App {
|
|||||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, "Unable to connect to the dependency-check database; analysis has stopped");
|
Logger.getLogger(App.class.getName()).log(Level.SEVERE, "Unable to connect to the dependency-check database; analysis has stopped");
|
||||||
Logger.getLogger(App.class.getName()).log(Level.FINE, "", ex);
|
Logger.getLogger(App.class.getName()).log(Level.FINE, "", ex);
|
||||||
} finally {
|
} finally {
|
||||||
|
Settings.cleanup();
|
||||||
if (scanner != null) {
|
if (scanner != null) {
|
||||||
scanner.cleanup();
|
scanner.cleanup();
|
||||||
}
|
}
|
||||||
@@ -147,7 +148,9 @@ public class App {
|
|||||||
* @param cli a reference to the CLI Parser that contains the command line arguments used to set the corresponding
|
* @param cli a reference to the CLI Parser that contains the command line arguments used to set the corresponding
|
||||||
* settings in the core engine.
|
* settings in the core engine.
|
||||||
*/
|
*/
|
||||||
private void updateSettings(CliParser cli) {
|
private void populateSettings(CliParser cli) {
|
||||||
|
|
||||||
|
Settings.initialize();
|
||||||
|
|
||||||
final boolean autoUpdate = cli.isAutoUpdate();
|
final boolean autoUpdate = cli.isAutoUpdate();
|
||||||
final String connectionTimeout = cli.getConnectionTimeout();
|
final String connectionTimeout = cli.getConnectionTimeout();
|
||||||
|
|||||||
Reference in New Issue
Block a user