--- old/XmlSettingsParser.java 2008-10-16 13:56:58.000000000 -0700 +++ settings/XmlSettingsParser.java 2008-10-15 16:12:06.000000000 -0700 @@ -46,6 +46,7 @@ import org.apache.ivy.util.Configurator; import org.apache.ivy.util.FileResolver; import org.apache.ivy.util.Message; +import org.apache.ivy.util.url.CredentialsStore; import org.apache.ivy.util.url.URLHandlerRegistry; import org.xml.sax.Attributes; import org.xml.sax.SAXException; @@ -220,7 +221,9 @@ macrodefStarted(qName, attributes); } else if ("module".equals(qName)) { moduleStarted(attributes); - } + } else if ( "credentials".equals(qName)) { + credentialsStarted(attributes); + } } catch (ParseException ex) { SAXException sax = new SAXException("problem in config file: " + ex.getMessage(), ex); sax.initCause(ex); @@ -233,6 +236,14 @@ } } + private void credentialsStarted(Map attributes) { + String realm = (String) attributes.remove("realm"); + String host = (String) attributes.remove("host"); + String userName = (String) attributes.remove("username"); + String passwd = (String) attributes.remove("passwd"); + CredentialsStore.INSTANCE.addCredentials(realm, host, userName, passwd); + } + private void moduleStarted(Map attributes) { attributes.put(IvyPatternHelper.MODULE_KEY, attributes.remove("name")); String resolver = (String) attributes.remove("resolver");