@Override
  public void apply() throws ConfigurationException {
    myModulesToRemove.forEach(moduleToRemove -> {
      var mavenProject = myMavenProjectsManager.findProject(moduleToRemove);
      if (null != mavenProject) {
        myPomsToIgnore.add(mavenProject.getPath());
      } else {
        // If we add and then remove a maven module in Project Structure,
        // its content stays on the disk and the module will be recreated during the next import.
        // To prevent it, we try to add its pom to ignore list
        var imlPath = moduleToRemove.getModuleFilePath();
        if (imlPath.endsWith(DOT_DEFAULT_EXTENSION)) {
          var pomPath = imlPath.substring(0, imlPath.length() - DOT_DEFAULT_EXTENSION.length()) + "/" + POM_XML;
          if (Files.exists(Path.of(pomPath))) {
            myPomsToIgnore.add(pomPath);
          }
        }
      }
    });
    myModulesToRemove.clear();
  }
@Override
  public void apply()