private void collectConfigFiles(List<ConfigPath> configPaths, Resource resource, String path) {
for (String child : resource.getChildren()) {
String childPath = path.length() > 0 ? path + "/" + child : child;
String resourcePath = "conf/" + childPath;
Resource childResource = moduleSource.getResource(resourcePath);
if (acceptFileName(childResource.isDirectory(), child)) {
if (childResource.isDirectory()) {
collectConfigFiles(configPaths, childResource, childPath);
} else {
if (childPath.endsWith(CONFIG_FILE_EXT)) { // should be the case
childPath = childPath.substring(0, childPath.length() - CONFIG_FILE_EXT.length());
}