MavenServerConnector (Project project, Sdk jdk, String multimoduleDirectory) { MavenDistribution distribution = MavenDistributionsCache.getInstance(project).getMavenDistribution(multimoduleDirectory); String vmOptions = MavenDistributionsCache.getInstance(project).getVmOptions(multimoduleDirectory); Integer debugPort = getFreeDebugPort(); MavenServerConnector connector; if (TrustedProjects.isTrusted(project) || project.isDefault()) { var connectorFactory = ApplicationManager.getApplication().getService(MavenServerConnectorFactory.class); connector = connectorFactory.create(project, jdk, vmOptions, debugPort, distribution, multimoduleDirectory); MavenLog.LOG.debug("[connector] new maven connector " + connector); } else { MavenLog.LOG.warn("Project " + project + " not trusted enough. Will not start maven for it"); connector = new DummyMavenServerConnector(project, jdk, vmOptions, distribution, multimoduleDirectory); } registerDisposable(project, connector); return connector; }