mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-18 17:47:05 +01:00
fixed issue with data directory and made a few other minor changes
Former-commit-id: 74ba4f4ef797bfa13d6c7c3335951f1f9b11f690
This commit is contained in:
@@ -67,6 +67,10 @@ import org.owasp.dependencycheck.utils.Settings;
|
||||
requiresOnline = true)
|
||||
public class DependencyCheckMojo extends AbstractMojo implements MavenMultiPageReport {
|
||||
|
||||
/**
|
||||
* The properties file location.
|
||||
*/
|
||||
private static final String PROPERTIES_FILE = "mojo.properties";
|
||||
/**
|
||||
* Name of the logging properties file.
|
||||
*/
|
||||
@@ -619,6 +623,23 @@ public class DependencyCheckMojo extends AbstractMojo implements MavenMultiPageR
|
||||
* proxy url, port, and connection timeout.
|
||||
*/
|
||||
private void populateSettings() {
|
||||
InputStream mojoProperties = null;
|
||||
try {
|
||||
mojoProperties = this.getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);
|
||||
Settings.mergeProperties(mojoProperties);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.WARNING, "Unable to load the dependency-check ant task.properties file.");
|
||||
Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.FINE, null, ex);
|
||||
} finally {
|
||||
if (mojoProperties != null) {
|
||||
try {
|
||||
mojoProperties.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.FINEST, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
|
||||
|
||||
if (proxyUrl != null && !proxyUrl.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user