MavenServerSettings (@NotNull Project project, @Nullable MavenGeneralSettings settings, @NotNull String multiModuleProjectDirectory) { if (settings == null) { settings = MavenWorkspaceSettingsComponent.getInstance(project).getSettings().getGeneralSettings(); } RemotePathTransformerFactory.Transformer transformer = RemotePathTransformerFactory.createForProject(project); MavenServerSettings result = new MavenServerSettings(); result.setLoggingLevel(settings.getOutputLevel().getLevel()); result.setOffline(settings.isWorkOffline()); result.setUpdateSnapshots(settings.isAlwaysUpdateSnapshots()); MavenDistribution mavenDistribution = MavenDistributionsCache.getInstance(project).getMavenDistribution(multiModuleProjectDirectory); String remotePath = transformer.toRemotePath(mavenDistribution.getMavenHome().toString()); result.setMavenHomePath(remotePath); File userSettings = MavenWslUtil.getUserSettings(project, settings.getUserSettingsFile(), settings.getMavenConfig()); String userSettingsPath = userSettings.toPath().toAbsolutePath().toString(); result.setUserSettingsPath(transformer.toRemotePath(userSettingsPath)); String localRepository = MavenWslUtil.getLocalRepo(project, settings.getLocalRepository(), new MavenInSpecificPath(mavenDistribution.getMavenHome().toFile()), settings.getUserSettingsFile(), settings.getMavenConfig()).getAbsolutePath(); result.setLocalRepositoryPath(transformer.toRemotePath(localRepository)); File file = getGlobalConfigFromMavenConfig(project, settings, transformer); if (file == null) { file = MavenUtil.resolveGlobalSettingsFile(mavenDistribution.getMavenHome().toFile()); } result.setGlobalSettingsPath(transformer.toRemotePath(file.getAbsolutePath())); return result; }