void (@NotNull DomFileElement<MavenDomProjectModel> domFileElement, @NotNull DomElementAnnotationHolder holder) { MavenDomProjectModel projectModel = domFileElement.getRootElement(); MultiMap<Pair<String,String>, MavenDomPlugin> duplicates = MultiMap.createSet(); for (MavenDomPlugin plugin : projectModel.getBuild().getPlugins().getPlugins()) { String groupId = plugin.getGroupId().getStringValue(); String artifactId = plugin.getArtifactId().getStringValue(); if (StringUtil.isEmptyOrSpaces(artifactId)) continue; if ("".equals(groupId) || "org.apache.maven.plugins".equals(groupId) || "org.codehaus.mojo".equals(groupId)) { groupId = null; } duplicates.putValue(Pair.create(groupId, artifactId), plugin); } for (Map.Entry<Pair<String,String>, Collection<MavenDomPlugin>> entry : duplicates.entrySet()) { Collection<MavenDomPlugin> set = entry.getValue(); if (set.size() <= 1) continue; for (MavenDomPlugin dependency : set) { holder.createProblem(dependency, HighlightSeverity.WARNING, MavenProjectBundle.message("inspection.message.duplicated.plugin.declaration")); } } }