return new Dependency(new Group(group), artifact, mapping, transitive);
}
private void resolveExtensions() {
for (Map.Entry<String, String> entry : configurationExtensionMap.entrySet()) {
final Configuration configuration = configurations.get(entry.getKey());
if (configuration == null) {
throw new IllegalArgumentException("Invalid configuration " + entry.getKey() + " used in configuration extension.");
}
final StringTokenizer tokenizer = new StringTokenizer(entry.getValue(), ",");
while (tokenizer.hasMoreTokens()) {
final String token = tokenizer.nextToken().trim();
final Configuration source = configurations.get(token);
if (source == null) {
throw new IllegalArgumentException("Invalid configuration " + token + " used in configuration extension.");
}
for (Artifact artifact : source.getArtifacts()) {
configuration.addArtifact(artifact);
}
}
}
}