private void checkConf(Stack confs, String confName) { int index = confs.indexOf(confName); if (index != -1) { StringBuffer cycle = new StringBuffer(); for (; index < confs.size(); index++) { cycle.append(confs.get(index)).append(" => "); } cycle.append(confName); throw new IllegalStateException("illegal cycle detected in configuration extension: " + cycle); } Configuration conf = getConfiguration(confName); if (conf == null) { throw new IllegalStateException("unknown configuration '" + confName + "'. It is extended by " + confs.get(confs.size() - 1)); } String[] ext = conf.getExtends(); for (int i = 0; i < ext.length; i++) { confs.push(conf.getName()); checkConf(confs, ext[i].trim()); confs.pop(); } }
public Artifact[] getArtifacts(String conf) { Configuration c = getConfiguration(conf); if (c == null) { return new Artifact[0];
Configuration c = getConfiguration(conf); if (c == null) { throw new IllegalArgumentException("Cannot add artifact '"