[maven] IDEA-91662 doesn't take into account mirror repositories as Indexed Maven...
[idea/community.git] / plugins / maven / maven30-server-impl / src / org / jetbrains / idea / maven / server / Maven30ServerEmbedderImpl.java
index d864f8815e70f45478ea64d48d6409604f9cceb2..54c1100d863a9e1134d67533f835f1abe408a8d5 100644 (file)
@@ -86,6 +86,8 @@ import java.rmi.RemoteException;
 import java.rmi.server.UnicastRemoteObject;
 import java.util.*;
 
+import static org.jetbrains.idea.maven.server.MavenModelConverter.convertRemoteRepositories;
+
 /**
  * Overridden maven components:
  * <p/>
@@ -925,6 +927,9 @@ public class Maven30ServerEmbedderImpl extends Maven3ServerEmbedder {
       validate(mavenProject.getFile(), Collections.singleton(e), problems, null);
     }
 
+    List<MavenRemoteRepository> remoteRepositories = convertRemoteRepositories(mavenProject.getRemoteArtifactRepositories());
+    model.setRemoteRepositories(remoteRepositories);
+
     RemoteNativeMavenProjectHolder holder = new RemoteNativeMavenProjectHolder(mavenProject);
     try {
       UnicastRemoteObject.exportObject(holder, 0);