MavenExecutionRequest (@Nullable File file, @Nullable List<String> activeProfiles, @Nullable List<String> inactiveProfiles, @NotNull Properties customProperties) { MavenExecutionRequest result = new DefaultMavenExecutionRequest(); try { getComponent(MavenExecutionRequestPopulator.class).populateFromSettings(result, myMavenSettings); result.setPom(file); getComponent(MavenExecutionRequestPopulator.class).populateDefaults(result); result.setSystemProperties(mySystemProperties); Properties userProperties = new Properties(); if (file != null) { userProperties.putAll(MavenServerConfigUtil.getMavenAndJvmConfigPropertiesForNestedProjectDir(file.getParentFile())); } userProperties.putAll(customProperties); result.setUserProperties(userProperties); result.setActiveProfiles(collectActiveProfiles(result.getActiveProfiles(), activeProfiles, inactiveProfiles)); if (inactiveProfiles != null) { result.setInactiveProfiles(inactiveProfiles); } result.setCacheNotFound(true); result.setCacheTransferError(true); result.setStartTime(new Date()); File mavenMultiModuleProjectDirectory = getMultimoduleProjectDir(file); result.setBaseDirectory(mavenMultiModuleProjectDirectory); Method setMultiModuleProjectDirectoryMethod = getSetMultiModuleProjectDirectoryMethod(result); if (setMultiModuleProjectDirectoryMethod != null) { try { result.setMultiModuleProjectDirectory(mavenMultiModuleProjectDirectory); } catch (Exception e) { MavenServerGlobals.getLogger().error(e); } } return result; } catch (MavenExecutionRequestPopulationException e) { throw new RuntimeException(e); } }