*/
protected void undeployEAR(final EARDeployable tmpEARDeployable) throws DeployerException {
logger.info("Undeploying {0}", tmpEARDeployable);
// From which deployable get the containers deployed
EARDeployable earDeployable = tmpEARDeployable;
// Was deployed ?
EARDeployable existingDeployable = null;
try {
existingDeployable = EARDeployable.class.cast(getDeployedDeployable(tmpEARDeployable.getArchive().getURL()
.toExternalForm()));
} catch (ArchiveException e) {
throw new DeployerException("Cannot get the URL on the EAR deployable '" + earDeployable + "'.", e);
}
if (existingDeployable != null) {
earDeployable = existingDeployable;
}
// Check if this archive has been unpacked ?
EARDeployable unpackedDeployable = earDeployable.getUnpackedDeployable();
if (unpackedDeployable != null) {
earDeployable = unpackedDeployable;
}
// get EAR URL