Environment environment = configurationData.getEnvironment();
LinkedHashSet parentIds = new LinkedHashSet();
List dependencies = new ArrayList(environment.getDependencies());
for (ListIterator iterator = dependencies.listIterator(); iterator.hasNext();) {
Dependency dependency = (Dependency) iterator.next();
Artifact resolvedArtifact = artifactResolver.resolveInClassLoader(dependency.getArtifact());
if (isConfiguration(resolvedArtifact)) {
parentIds.add(resolvedArtifact);
// update the dependency list to contain the resolved artifact
dependency = new Dependency(resolvedArtifact, dependency.getImportType());
iterator.set(dependency);
} else if (dependency.getImportType() == ImportType.SERVICES) {
// Service depdendencies require that the depdencency be a configuration
throw new InvalidConfigException("Dependency does not have services: " + resolvedArtifact);
}
}