* Merge everything into WarMetaData.
*/
public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {
WarMetaData warMetaData = context.getAttachment(WarMetaData.ATTACHMENT_KEY);
assert warMetaData != null;
DeploymentStructure structure = context.getAttachment(DeploymentStructure.ATTACHMENT_KEY);
assert structure != null;
assert structure.getEntries() != null;
WebMetaData specMetaData = warMetaData.getWebMetaData();
boolean isComplete = false;
if (specMetaData != null) {
if (specMetaData instanceof Web25MetaData) {
isComplete |= ((Web25MetaData) specMetaData).isMetadataComplete();
} else if (specMetaData instanceof Web30MetaData) {
isComplete |= ((Web30MetaData) specMetaData).isMetadataComplete();
} else {
// Any web.xml 2.4 or earlier deployment is metadata complete
isComplete = true;
}
}
// Find all fragments that have been processed by deployers, and place
// them in a map keyed by location
LinkedList<String> order = new LinkedList<String>();
List<WebOrdering> orderings = new ArrayList<WebOrdering>();
HashSet<String> jarsSet = new HashSet<String>();
Set<VirtualFile> overlays = new HashSet<VirtualFile>();
Map<String, VirtualFile> scis = new HashMap<String, VirtualFile>();
boolean fragmentFound = false;
Map<String, WebFragmentMetaData> webFragments = warMetaData.getWebFragmentsMetaData();
for (DeploymentStructure.ClassPathEntry resourceRoot : structure.getEntries()) {
if (resourceRoot.getRoot().getLowerCaseName().endsWith(".jar")) {
jarsSet.add(resourceRoot.getName());
// Find overlays
VirtualFile overlay = resourceRoot.getRoot().getChild("META-INF/resources");
if (overlay.exists()) {