for (ConfigDescriptor descriptor : configDescriptors) {
String basename = FileUtil.normalizeUnixPath(descriptor.getName() + "/../");
for (int j = 0; j < descriptor.getGenerates().length; j++) {
ConfigGenerate generate = descriptor.getGenerates()[j];
// ����template/destfile
String template = generate.getTemplate();
String destFile = generate.getDestfile();
if (StringUtil.isBlank(template)) {
logger.warn("Missing template attribute in <generate>: file=" + descriptor.getURL());
descriptor.removeGenerate(generate);
continue;
}
if (StringUtil.isBlank(destFile)) {
destFile = template;
}
template = FileUtil.normalizeUnixPath("./" + template);
destFile = FileUtil.normalizeUnixPath("./" + destFile);
generate.setTemplateBase(basename);
generate.setTemplate(template);
generate.setDestfile(destFile);
// ��ֹdestfile�ظ�
if (generateDestFiles.containsKey(destFile)) {
ConfigGenerate originalGenerate = (ConfigGenerate) generateDestFiles.get(destFile);
if (originalGenerate.getConfigDescriptor() == descriptor) {
logger.info("Duplicated destfile " + destFile + "\n in " + descriptor.getURL());
} else {
logger.info("Duplicated destfile " + destFile + "\n in " + descriptor.getURL() + "\n and "
+ originalGenerate.getConfigDescriptor().getURL());
}
descriptor.removeGenerate(generate);
continue;
}