use of org.jetbrains.idea.maven.model.MavenWorkspaceMap in project intellij-community by JetBrains.
the class CustomRepositoryMetadataManager method resolve.
@Override
public void resolve(RepositoryMetadata metadata, List remoteRepositories, ArtifactRepository localRepository) throws RepositoryMetadataResolutionException {
super.resolve(metadata, remoteRepositories, localRepository);
MavenWorkspaceMap map = myWorkspaceMap;
if (map == null)
return;
Metadata data = metadata.getMetadata();
Versioning versioning = data.getVersioning();
if (versioning == null) {
data.setVersioning(versioning = new Versioning());
}
for (MavenId each : map.getAvailableIds()) {
if (each.equals(data.getGroupId(), data.getArtifactId())) {
versioning.addVersion(each.getVersion());
}
}
}
Aggregations