}
}
}
private void addExternalDependency(Artifact artifact, File artifactFile, String resolvedConfiguration, Project project) {
ExternalDependency externalDependency = ExternalDependencyFactory.getInstance().createExternalDependency(artifact, artifactFile, project, resolvedConfiguration);
if (externalDependency == null) {
resolveProblems.add(new ResolveProblem(
artifact.getModuleRevisionId().toString(),
"Unrecognized artifact type: " + artifact.getType() + ", will not add this as a dependency in IntelliJ.",
null));
LOGGER.warning("Artifact of unrecognized type " + artifact.getType() + " found, *not* adding as a dependency.");
}
else if (externalDependency.isMissing()) {
resolveProblems.add(new ResolveProblem(
artifact.getModuleRevisionId().toString(),
"File not found: " + externalDependency.getLocalFile().getAbsolutePath())
);
} else {
resolvedDependencies.add(externalDependency);
}
}