Collection<MavenDomPlugin> (@NotNull final MavenDomProjectModel model, @Nullable final String groupId, @NotNull final String artifactId) { Project project = model.getManager().getProject(); final Set<MavenDomPlugin> usages = new HashSet<>(); Processor<MavenDomProjectModel> collectProcessor = mavenDomProjectModel -> { for (MavenDomPlugin domPlugin : mavenDomProjectModel.getBuild().getPlugins().getPlugins()) { if (MavenPluginDomUtil.isPlugin(domPlugin, groupId, artifactId)) { usages.add(domPlugin); } } return false; }; processChildrenRecursively(model, collectProcessor, project, new HashSet<>(), true); return usages; }