void (List<Element> xmlProfiles, List<MavenProfile> result, String source) { for (Element each : xmlProfiles) { String id = MavenJDOMUtil.findChildValueByPath(each, "id"); if (isEmptyOrSpaces(id)) continue; MavenProfile profile = new MavenProfile(id, source); if (!addProfileIfDoesNotExist(profile, result)) continue; Element xmlActivation = MavenJDOMUtil.findChildByPath(each, "activation"); if (xmlActivation != null) { MavenProfileActivation activation = new MavenProfileActivation(); activation.setActiveByDefault("true".equals(MavenJDOMUtil.findChildValueByPath(xmlActivation, "activeByDefault"))); Element xmlOS = MavenJDOMUtil.findChildByPath(xmlActivation, "os"); if (xmlOS != null) { activation.setOs(new MavenProfileActivationOS( MavenJDOMUtil.findChildValueByPath(xmlOS, "name"), MavenJDOMUtil.findChildValueByPath(xmlOS, "family"), MavenJDOMUtil.findChildValueByPath(xmlOS, "arch"), MavenJDOMUtil.findChildValueByPath(xmlOS, "version"))); } activation.setJdk(MavenJDOMUtil.findChildValueByPath(xmlActivation, "jdk")); Element xmlProperty = MavenJDOMUtil.findChildByPath(xmlActivation, "property"); if (xmlProperty != null) { activation.setProperty(new MavenProfileActivationProperty( MavenJDOMUtil.findChildValueByPath(xmlProperty, "name"), MavenJDOMUtil.findChildValueByPath(xmlProperty, "value"))); } Element xmlFile = MavenJDOMUtil.findChildByPath(xmlActivation, "file"); if (xmlFile != null) { activation.setFile(new MavenProfileActivationFile( MavenJDOMUtil.findChildValueByPath(xmlFile, "exists"), MavenJDOMUtil.findChildValueByPath(xmlFile, "missing"))); } profile.setActivation(activation); } readModelBody(profile, profile.getBuild(), each); } }