List of usage examples for org.apache.maven.settings.io SettingsReader read
Settings read(InputStream input, Map<String, ?> options) throws IOException, SettingsParseException;
From source file:org.jboss.as.plugin.AbstractJbossMavenPluginMojoTestCase.java
License:Open Source License
/** * Gets a settings.xml file from the input File and prepares it to be * attached to a pom.xml/*from ww w.j ava 2 s. c o m*/ * * @param userSettingsFile file object pointing to the candidate settings file * * @return the settings object * * @throws IOException - if the settings file can't be read */ private Settings getSettingsFile(File userSettingsFile) throws IOException { Map<String, ?> options = Collections.singletonMap(SettingsReader.IS_STRICT, Boolean.TRUE); SettingsReader reader = new DefaultSettingsReader(); Settings settings = null; try { settings = reader.read(userSettingsFile, options); } catch (SettingsParseException e) { } return settings; }