if (property == null) {
throw new BuildException("'property' is a required attribute for 'ceylon-config-value'");
}
CeylonConfig config = getConfig();
Repositories reps = Repositories.withConfig(config);
Repository rep;
String repdesc;
if (name != null) {
rep = reps.getRepository(name);
repdesc = "of name '" + name + "'";
} else {
rep = reps.getRepositoryByTypeWithDefaults(type.name());
repdesc = "of type '" + type.name() + "'";
}
if (rep != null) {
String value = null;
switch (key) {
case name:
value = rep.getName(); break;
case url:
value = rep.getUrl(); break;
default:
Credentials cred = rep.getCredentials();
if (cred != null) {
switch (key) {
case user:
value = cred.getUser(); break;
case password: