if (top.isTopLevel() == false) {
top = du.getTopLevel();
}
VirtualFile root=((VFSDeploymentUnit)du).getRoot();
logger.debug("Deployment descriptor file="+root);
try {
VirtualFile parent=((VFSDeploymentUnit)du).getRoot().getParent();
long lastModTime=0;
if (top instanceof VFSDeploymentUnit) {
lastModTime = ((VFSDeploymentUnit)top).getRoot().getLastModified();
} else {
logger.warn("Unable to determine last modified time for: "+top);
}
// TODO: Need to be a more unique name, as it is possible that more
// than one deployment descriptor may exist in the same AS archive
BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), lastModTime);
if (m_deploymentUnits.containsKey(unit.getName())) {
doUndeploy(du, top);
}
logger.info("Deploy: "+top.getSimpleName()+" relativePath="+
du.getRelativePath());
logger.debug("Deployment unit dir="+parent);
// Explore the deployment unit (in place of previous VFSUtils.explode() which no longer exists)
java.net.URL url=VFSUtils.getPhysicalURL(parent);
for (VirtualFile vfile : parent.getChildrenRecursively()) {
VFSUtils.getPhysicalURL(vfile);
}
logger.debug("Deployment exploded to dir="+root+" URL="+url);