void (MavenProject mavenProject, MultiMap<JpsModuleSourceRootType<?>, String> roots) { roots.putValues(JavaSourceRootType.SOURCE, mavenProject.getSources()); for (MavenImporter each : MavenImporter.getSuitableImporters(mavenProject)) { each.collectSourceRoots(mavenProject, (s, type) -> roots.putValue(type, s)); } for (MavenResource each : mavenProject.getResources()) { roots.putValue(JavaResourceRootType.RESOURCE, each.getDirectory()); } BuildHelperMavenPluginUtil.addBuilderHelperPaths(mavenProject, "add-source", path -> roots.putValue(JavaSourceRootType.SOURCE, path)); BuildHelperMavenPluginUtil.addBuilderHelperResourcesPaths(mavenProject, "add-resource", path -> roots.putValue(JavaResourceRootType.RESOURCE, path)); }