use of org.commonjava.maven.ext.common.model.YamlFile in project pom-manipulation-ext by release-engineering.
the class ConfigIO method loadYamlFile.
private Properties loadYamlFile(final File configFile) throws ManipulationException {
Properties result = new Properties();
Representer representer = new Representer();
representer.getPropertyUtils().setSkipMissingProperties(true);
Yaml yaml = new Yaml(representer);
try {
YamlFile yf = yaml.loadAs(new FileInputStream(configFile), YamlFile.class);
result.putAll(yf.getPme());
} catch (FileNotFoundException e) {
throw new ManipulationException("Unable to load yaml file.", e);
}
return result;
}
Aggregations