Map<String, Object> args = new HashMap<String, Object>((Map<String, ?>) userDependencyDescription);
String group = getAndRemove(args, "group");
String name = getAndRemove(args, "name");
String version = getAndRemove(args, "version");
String configuration = getAndRemove(args, "configuration");
ExternalDependency dependency = (ExternalDependency) classGenerator.newInstance(type, group, name, version, configuration);
ModuleFactoryHelper.addExplicitArtifactsIfDefined(dependency, getAndRemove(args, "ext"), getAndRemove(args,
"classifier"));
ConfigureUtil.configureByMap(args, dependency);
return type.cast(dependency);
}