Set<Artifact> artifacts = mavenProject.getArtifacts();
Map<Artifact, String> deployedArtifacts = getDeployedArtifacts(artifacts, config);
Iterator<IClasspathEntryDescriptor> iter = classpath.getEntryDescriptors().iterator();
while (iter.hasNext()) {
IClasspathEntryDescriptor descriptor = iter.next();
Artifact artifact = ArtifactHelper.getArtifact(artifacts, descriptor.getArtifactKey());
if (artifact == null) {
return;
}
String deployedName = deployedArtifacts.get(artifact);
if(deployedName == null || isWorkspaceProject(artifact)) {
descriptor.setClasspathAttribute(NONDEPENDENCY_ATTRIBUTE.getName(), NONDEPENDENCY_ATTRIBUTE.getValue());
continue;
}
descriptor.getClasspathAttributes().put(CLASSPATH_ARCHIVENAME_ATTRIBUTE, deployedName);
}
}