void (MavenModelBase mavenModelBase, MavenBuildBase mavenBuildBase, Element xmlModel) { mavenModelBase.setModules(MavenJDOMUtil.findChildrenValuesByPath(xmlModel, "modules", "module")); collectProperties(MavenJDOMUtil.findChildByPath(xmlModel, "properties"), mavenModelBase); Element xmlBuild = MavenJDOMUtil.findChildByPath(xmlModel, "build"); mavenBuildBase.setFinalName(MavenJDOMUtil.findChildValueByPath(xmlBuild, "finalName")); mavenBuildBase.setDefaultGoal(MavenJDOMUtil.findChildValueByPath(xmlBuild, "defaultGoal")); mavenBuildBase.setDirectory(MavenJDOMUtil.findChildValueByPath(xmlBuild, "directory")); mavenBuildBase.setResources(collectResources(MavenJDOMUtil.findChildrenByPath(xmlBuild, "resources", "resource"))); mavenBuildBase.setTestResources(collectResources(MavenJDOMUtil.findChildrenByPath(xmlBuild, "testResources", "testResource"))); mavenBuildBase.setFilters(MavenJDOMUtil.findChildrenValuesByPath(xmlBuild, "filters", "filter")); if (mavenBuildBase instanceof MavenBuild mavenBuild) { String source = MavenJDOMUtil.findChildValueByPath(xmlBuild, "sourceDirectory"); if (!isEmptyOrSpaces(source)) mavenBuild.addSource(source); String testSource = MavenJDOMUtil.findChildValueByPath(xmlBuild, "testSourceDirectory"); if (!isEmptyOrSpaces(testSource)) mavenBuild.addTestSource(testSource); mavenBuild.setOutputDirectory(MavenJDOMUtil.findChildValueByPath(xmlBuild, "outputDirectory")); mavenBuild.setTestOutputDirectory(MavenJDOMUtil.findChildValueByPath(xmlBuild, "testOutputDirectory")); } }