MavenServerConnector (@NotNull Project project, @NotNull String workingDirectory) { String multimoduleDirectory = MavenDistributionsCache.getInstance(project).getMultimoduleDirectory(workingDirectory); MavenWorkspaceSettings settings = MavenWorkspaceSettingsComponent.getInstance(project).getSettings(); Sdk jdk = getJdk(project, settings); MavenServerConnector connector = doGetOrCreateConnector(project, multimoduleDirectory, jdk); if (connector.isNew()) { connector.connect(); } else { if (!compatibleParameters(project, connector, jdk, multimoduleDirectory)) { MavenLog.LOG.info("[connector] " + connector + " is incompatible, restarting"); shutdownConnector(connector, false); connector = this.doGetOrCreateConnector(project, multimoduleDirectory, jdk); connector.connect(); } } if (MavenLog.LOG.isTraceEnabled()) { MavenLog.LOG.trace("[connector] get " + connector); } return connector; }