diff --git a/ivy/IvyInterface.scala b/ivy/IvyInterface.scala index 531597e19..cbbede0ca 100644 --- a/ivy/IvyInterface.scala +++ b/ivy/IvyInterface.scala @@ -365,41 +365,4 @@ object ModuleConfiguration { def apply(org: String, resolver: Resolver): ModuleConfiguration = apply(org, "*", "*", resolver) def apply(org: String, name: String, resolver: Resolver): ModuleConfiguration = ModuleConfiguration(org, name, "*", resolver) -} -/* -object Credentials -{ - /** Add the provided credentials to Ivy's credentials cache.*/ - def add(realm: String, host: String, userName: String, passwd: String): Unit = - CredentialsStore.INSTANCE.addCredentials(realm, host, userName, passwd) - /** Load credentials from the given file into Ivy's credentials cache.*/ - def apply(file: String, log: Logger): Unit = apply(Path.fromFile(file), log) - /** Load credentials from the given file into Ivy's credentials cache.*/ - def apply(file: File, log: Logger): Unit = apply(Path.fromFile(file), log) - /** Load credentials from the given file into Ivy's credentials cache.*/ - def apply(path: Path, log: Logger) - { - val msg = - if(path.exists) - { - val properties = new scala.collection.mutable.HashMap[String, String] - def get(keys: List[String]) = keys.flatMap(properties.get).firstOption.toRight(keys.head + " not specified in credentials file: " + path) - - impl.MapUtilities.read(properties, path, log) orElse - { - List.separate( List(RealmKeys, HostKeys, UserKeys, PasswordKeys).map(get) ) match - { - case (Nil, List(realm, host, user, pass)) => add(realm, host, user, pass); None - case (errors, _) => Some(errors.mkString("\n")) - } - } - } - else - Some("Credentials file " + path + " does not exist") - msg.foreach(x => log.warn(x)) - } - private[this] val RealmKeys = List("realm") - private[this] val HostKeys = List("host", "hostname") - private[this] val UserKeys = List("user", "user.name", "username") - private[this] val PasswordKeys = List("password", "pwd", "pass", "passwd") -}*/ \ No newline at end of file +} \ No newline at end of file