String (final String propName, final MavenModuleResourceConfiguration moduleConfig, Map<String, String> additionalProperties) { boolean hasPrefix = false; String unprefixed = propName; if (propName.startsWith("pom.")) { unprefixed = propName.substring("pom.".length()); hasPrefix = true; } else if (propName.startsWith("project.")) { unprefixed = propName.substring("project.".length()); hasPrefix = true; } MavenModuleResourceConfiguration selectedConfig = moduleConfig; while (unprefixed.startsWith("parent.")) { MavenIdBean parentId = selectedConfig.parentId; if (parentId == null) { return null; } unprefixed = unprefixed.substring("parent.".length()); if (unprefixed.equals("groupId")) { return parentId.groupId; } if (unprefixed.equals("artifactId")) { return parentId.artifactId; } selectedConfig = findProject(parentId); if (selectedConfig == null) { return null; } } if (unprefixed.equals("basedir") || (hasPrefix && moduleConfig == selectedConfig && unprefixed.equals("baseUri"))) { return selectedConfig.directory; } String result; result = getMavenOptsProperties().get(propName); if (result != null) { return result; } result = getMavenAndJvmConfig(selectedConfig).get(propName); if (result != null) { return result; } result = getSystemProperties().getProperty(propName); if (result != null) { return result; } result = selectedConfig.modelMap.get(unprefixed); if (result != null) { return result; } result = additionalProperties.get(propName); if (result != null) { return result; } return moduleConfig.properties.get(propName); }