[maven] IDEA-91662 doesn't take into account mirror repositories as Indexed Maven...
[idea/community.git] / plugins / maven / maven2-server-impl / src / org / jetbrains / idea / maven / server / embedder / Maven2ServerEmbedderImpl.java
index 723447e5b6d198b7489dbe18fe06c2a9729ef30d..577a43175f482d72df6b5add00137875be907e42 100644 (file)
@@ -63,6 +63,8 @@ import java.rmi.server.UnicastRemoteObject;
 import java.util.*;
 import java.util.concurrent.*;
 
+import static org.jetbrains.idea.maven.server.embedder.Maven2ModelConverter.convertRemoteRepositories;
+
 public final class Maven2ServerEmbedderImpl extends MavenRemoteObject implements MavenServerEmbedder {
   private final MavenEmbedder myImpl;
   private final Maven2ServerConsoleWrapper myConsoleWrapper;
@@ -325,6 +327,9 @@ public final class Maven2ServerEmbedderImpl extends MavenRemoteObject implements
                                                          mavenProject.getExtensionArtifacts(),
                                                          getLocalRepositoryFile());
 
+    List<MavenRemoteRepository> remoteRepositories = convertRemoteRepositories(mavenProject.getRemoteArtifactRepositories());
+    model.setRemoteRepositories(remoteRepositories);
+
     RemoteNativeMavenProjectHolder holder = new RemoteNativeMavenProjectHolder(mavenProject);
     try {
       UnicastRemoteObject.exportObject(holder, 0);