Environment environment = configurationData.getEnvironment();
LinkedHashSet<Artifact> parentIds = new LinkedHashSet<Artifact>();
List<Dependency> dependencies = new ArrayList<Dependency>(environment.getDependencies());
for (ListIterator<Dependency> iterator = dependencies.listIterator(); iterator.hasNext();) {
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);
}
}