String extension = FilenameUtils.getExtension(file);
if(loadEntriesWithinZipArchives && (
"zip".equalsIgnoreCase(extension) ||
"jar".equalsIgnoreCase(extension))){
log.info(" - processing {}-archive entries:",extension);
ZipFile zipArchive;
try {
zipArchive = new ZipFile(file);
} catch (IOException e) {
zipArchive = null;
setResourceState(file, ResourceState.ERROR,e);
}
if(zipArchive != null){
boolean isError = false;
Enumeration<ZipArchiveEntry> entries = zipArchive.getEntries();
while(entries.hasMoreElements()){
ZipArchiveEntry entry = entries.nextElement();
if(!entry.isDirectory()){
String entryName = entry.getName();
log.info(" o loading entry '{}'", entryName);
try {
ResourceState state = resourceImporter.importResource(
zipArchive.getInputStream(entry),
FilenameUtils.getName(entryName));
if(state == ResourceState.ERROR){
isError = true;
}
} catch (IOException e) {