mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-13 05:35:36 +01:00
changes to resolve issues with multiple connections to the embedded H2 database
This commit is contained in:
@@ -16,4 +16,4 @@
|
||||
# Copyright (c) 2014 Jeremy Long. All Rights Reserved.
|
||||
#
|
||||
|
||||
invoker.goals = install ${project.groupId}:${project.artifactId}:${project.version}:check -X -T 12
|
||||
invoker.goals = install ${project.groupId}:${project.artifactId}:${project.version}:check -X -T 10
|
||||
|
||||
@@ -81,8 +81,6 @@ public class UpdateMojo extends BaseDependencyCheckMojo {
|
||||
throw new MojoExecutionException(msg, ex);
|
||||
}
|
||||
getLog().error(msg);
|
||||
} finally {
|
||||
getSettings().cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,18 +92,18 @@ public class BaseDependencyCheckMojoTest extends BaseTest {
|
||||
|
||||
boolean autoUpdate = getSettings().getBoolean(Settings.KEYS.AUTO_UPDATE);
|
||||
getSettings().setBoolean(Settings.KEYS.AUTO_UPDATE, false);
|
||||
Engine engine = new Engine(getSettings());
|
||||
getSettings().setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
|
||||
try (Engine engine = new Engine(getSettings())) {
|
||||
getSettings().setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
|
||||
|
||||
assertTrue(engine.getDependencies().length == 0);
|
||||
BaseDependencyCheckMojoImpl instance = new BaseDependencyCheckMojoImpl();
|
||||
try { //the mock above fails under some JDKs
|
||||
instance.scanArtifacts(project, engine);
|
||||
} catch (NullPointerException ex) {
|
||||
Assume.assumeNoException(ex);
|
||||
assertTrue(engine.getDependencies().length == 0);
|
||||
BaseDependencyCheckMojoImpl instance = new BaseDependencyCheckMojoImpl();
|
||||
try { //the mock above fails under some JDKs
|
||||
instance.scanArtifacts(project, engine);
|
||||
} catch (NullPointerException ex) {
|
||||
Assume.assumeNoException(ex);
|
||||
}
|
||||
assertFalse(engine.getDependencies().length == 0);
|
||||
}
|
||||
assertFalse(engine.getDependencies().length == 0);
|
||||
engine.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user