Package org.apache.maven.settings.io

Examples of org.apache.maven.settings.io.DefaultSettingsReader


public class DefaultSettingsBuilderFactory
{

    protected SettingsReader newSettingsReader()
    {
        return new DefaultSettingsReader();
    }
View Full Code Here


     *
     * @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;
View Full Code Here

        DefaultSettingsBuilder defaultSettingsBuilder = new DefaultSettingsBuilder();
        DefaultSettingsBuildingRequest request = new DefaultSettingsBuildingRequest();
        File userSettingsFile = new File(System.getProperty("user.home"), ".m2" + File.separator + "settings.xml");
        request.setUserSettingsFile(userSettingsFile);
        defaultSettingsBuilder.setSettingsWriter(new DefaultSettingsWriter());
        defaultSettingsBuilder.setSettingsReader(new DefaultSettingsReader());
        defaultSettingsBuilder.setSettingsValidator(new DefaultSettingsValidator());
        SettingsBuildingResult build = defaultSettingsBuilder.build(request);
        return build.getEffectiveSettings();
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.settings.io.DefaultSettingsReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.