private Settings loadSettings()

in src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java [305:335]


    private Settings loadSettings( File settingsFile )
    {
        Settings settings = null;
        try
        {
            if ( settingsFile != null )
            {
                log( "Loading Maven settings file: " + settingsFile.getPath(), Project.MSG_VERBOSE );
                settings = readSettings( settingsFile );
            }
        }
        catch ( IOException e )
        {
            log( "Error reading settings file '" + settingsFile + "' - ignoring. Error was: " + e.getMessage(),
                 Project.MSG_WARN );
        }
        catch ( XmlPullParserException e )
        {
            log( "Error parsing settings file '" + settingsFile + "' - ignoring. Error was: " + e.getMessage(),
                 Project.MSG_WARN );
        }

        if ( settings == null )
        {
            settings = new Settings();
            RuntimeInfo rtInfo = new RuntimeInfo( settings );
            settings.setRuntimeInfo( rtInfo );
        }

        return settings;
    }