webXml.merge(orderedFragments);
return webXml;
}
private Map<String, WebXml> scanForFragments(WebXmlParser webXmlParser) throws JasperException {
StandardJarScanner scanner = new StandardJarScanner();
// TODO - enabling this means initializing the classloader first in JspC
scanner.setScanClassPath(false);
// TODO - configure filter rules from Ant rather then system properties
scanner.setJarScanFilter(new StandardJarScanFilter());
FragmentJarScannerCallback callback =
new FragmentJarScannerCallback(webXmlParser, false, true);
scanner.scan(JarScanType.PLUGGABILITY, this, callback);
if (!callback.isOk()) {
throw new JasperException(Localizer.getMessage("jspc.error.invalidFragment"));
}
return callback.getFragments();
}