private Map<String, String> collectModulesRelativePathsAndNames(MavenModel mavenModel, String basePath) {
    String extension = StringUtil.notNullize(myFile.getExtension());
    LinkedHashMap<String, String> result = new LinkedHashMap<>();
    for (String name : mavenModel.getModules()) {
      name = name.trim();

      if (name.length() == 0) continue;

      String originalName = name;
      // module name can be relative and contain either / of \\ separators

      name = FileUtil.toSystemIndependentName(name);

      String finalName = name;
      boolean fullPathInModuleName = ContainerUtil.exists(MavenConstants.POM_EXTENSIONS, ext -> finalName.endsWith('.' + ext));
      if (!fullPathInModuleName) {
        if (!name.endsWith("/")) name += "/";
        name += MavenConstants.POM_EXTENSION + '.' + extension;
      }
      else {
        String systemDependentName = FileUtil.toSystemDependentName(basePath + name);
        if (new File(systemDependentName).isDirectory()) {
          name += "/" + MavenConstants.POM_XML;
        }
      }

      result.put(name, originalName);
    }
    return result;
  }
private Map<String, String> collectModulesRelativePathsAndNames(MavenModel mavenModel, String basePath)