Example usage for org.apache.maven.settings.io SettingsReader IS_STRICT

List of usage examples for org.apache.maven.settings.io SettingsReader IS_STRICT

Introduction

In this page you can find the example usage for org.apache.maven.settings.io SettingsReader IS_STRICT.

Prototype

String IS_STRICT

To view the source code for org.apache.maven.settings.io SettingsReader IS_STRICT.

Click Source Link

Document

The key for the option to enable strict parsing.

Usage

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//w w 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;
}