RawModelReadResult (VirtualFile file, boolean headerOnly, Collection<MavenProjectProblem> problems, Set<String> alwaysOnProfiles, boolean isAutomaticVersionFeatureEnabled) { MavenModel result; result = new MavenModel(); Element xmlProject = readXml(file, problems, MavenProjectProblem.ProblemType.SYNTAX); if (xmlProject == null || !"project".equals(xmlProject.getName())) { result.setPackaging(MavenConstants.TYPE_JAR); return new RawModelReadResult(result, problems, alwaysOnProfiles); } MavenParent parent; if (MavenJDOMUtil.hasChildByPath(xmlProject, "parent")) { parent = new MavenParent(new MavenId(MavenJDOMUtil.findChildValueByPath(xmlProject, "parent.groupId", UNKNOWN), MavenJDOMUtil.findChildValueByPath(xmlProject, "parent.artifactId", UNKNOWN), calculateParentVersion(xmlProject, problems, file, isAutomaticVersionFeatureEnabled)), MavenJDOMUtil.findChildValueByPath(xmlProject, "parent.relativePath", "../pom.xml")); result.setParent(parent); } else { parent = new MavenParent(new MavenId(UNKNOWN, UNKNOWN, UNKNOWN), "../pom.xml"); } result.setMavenId(new MavenId(MavenJDOMUtil.findChildValueByPath(xmlProject, "groupId", parent.getMavenId().getGroupId()), MavenJDOMUtil.findChildValueByPath(xmlProject, "artifactId", UNKNOWN), MavenJDOMUtil.findChildValueByPath(xmlProject, "version", parent.getMavenId().getVersion()))); if (headerOnly) return new RawModelReadResult(result, problems, alwaysOnProfiles); result.setPackaging(MavenJDOMUtil.findChildValueByPath(xmlProject, "packaging", MavenConstants.TYPE_JAR)); result.setName(MavenJDOMUtil.findChildValueByPath(xmlProject, "name")); readModelBody(result, result.getBuild(), xmlProject); result.setProfiles(collectProfiles(file, xmlProject, problems, alwaysOnProfiles)); return new RawModelReadResult(result, problems, alwaysOnProfiles); }