List<MavenResource> (List<Element> xmlResources) { List<MavenResource> result = new ArrayList<>(); for (Element each : xmlResources) { String directory = MavenJDOMUtil.findChildValueByPath(each, "directory"); boolean filtered = "true".equals(MavenJDOMUtil.findChildValueByPath(each, "filtering")); String targetPath = MavenJDOMUtil.findChildValueByPath(each, "targetPath"); List<String> includes = MavenJDOMUtil.findChildrenValuesByPath(each, "includes", "include"); List<String> excludes = MavenJDOMUtil.findChildrenValuesByPath(each, "excludes", "exclude"); if (null == directory) continue; result.add(new MavenResource(directory, filtered, targetPath, includes, excludes)); } return result; }