final URL url = entry.getValue();
final String name = entry.getKey();
if (name.endsWith(".xml")) {
this.archive.add(new Named("WEB-INF/" + name, new UrlAsset(url)));
} else {
boolean keep = true;
if (excluded != null) {
for (final Class<?> excludedClazz : excluded) {
if (name.equals(excludedClazz.getSimpleName().concat(".class"))) {
keep = false;
}
}
}
if (keep) {
final String path = url.getPath();
final String relativePath = path.substring(path.indexOf(packageName));
this.archive.add(new Named("WEB-INF/classes/" + relativePath, new UrlAsset(url)));
}
}
}
} catch (final IOException e) {
throw new IllegalStateException("cannot list package contents", e);