boolean (final File extensionFile, @NotNull MavenId mavenId) { try { Element extensions = getDomRootElement(extensionFile); if (extensions == null) return false; if (!extensions.getName().equals("extensions")) return false; for (Element extension : getElementsWithRegardToNamespace(extensions, "extension", extensionListNamespaces)) { Element groupId = getElementWithRegardToNamespace(extension, "groupId", extensionListNamespaces); Element artifactId = getElementWithRegardToNamespace(extension, "artifactId", extensionListNamespaces); Element version = getElementWithRegardToNamespace(extension, "version", extensionListNamespaces); if (groupId != null && groupId.getTextTrim().equals(mavenId.getGroupId()) && artifactId != null && artifactId.getTextTrim().equals(mavenId.getArtifactId()) && version != null && version.getTextTrim().equals(mavenId.getVersion())) { return true; } } } catch (IOException | JDOMException e) { return false; } return false; }