if (directory.exists() && directory.isDirectory()) {
store = new DirectoryResourceStore(directory);
File webinf = new File(directory, "WEB-INF");
if (directory.getName().endsWith(".war") || webinf.isDirectory()) {
// this is a war file, use the right mapper
store.setResourceMapper(new WABResourceMapper());
}
store.setManifest(manifestProvider.getManifest());
store.setManifestFile(selectedManifestFile);
DefaultManifestBuilder dmb = new DefaultManifestBuilder();
dmb.setMetadataRenderer(new MetadataRenderer());