Package org.apache.maven.settings.building

Examples of org.apache.maven.settings.building.DefaultSettingsBuilder


     * @return Maven {@code Settings}
     *
     * @throws SettingsBuildingException If there are problems loading the settings.
     */
    public static Settings getSettings() throws SettingsBuildingException {
        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.building.DefaultSettingsBuilder

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.