in src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java [1967:1998]
private Properties getSystemProperties(final File basedir, final String filename) throws MojoExecutionException {
Properties collectedTestProperties = new Properties();
if (properties != null) {
// MINVOKER-118: property can have empty value, which is not accepted by collectedTestProperties
for (Map.Entry<String, String> entry : properties.entrySet()) {
if (entry.getValue() != null) {
collectedTestProperties.put(entry.getKey(), entry.getValue());
}
}
}
File propertiesFile = null;
if (filename != null) {
propertiesFile = new File(basedir, filename);
} else if (testPropertiesFile != null) {
propertiesFile = new File(basedir, testPropertiesFile);
}
if (propertiesFile != null && propertiesFile.isFile()) {
try (InputStream fin = new FileInputStream(propertiesFile)) {
Properties loadedProperties = new Properties();
loadedProperties.load(fin);
collectedTestProperties.putAll(loadedProperties);
} catch (IOException e) {
throw new MojoExecutionException("Error reading system properties from " + propertiesFile);
}
}
return collectedTestProperties;
}