Improve/fix the logic in AbstractCopyingInstalledLocalDeployer.deploy(...) wrt expanded and shouldDeployExpanded


There's a weird piece of code in AbstractCopyingInstalledLocalDeployer.deploy(...):

1) War, EAR, etc are all Deployable and could then, according to that interface, be expanded. So why is the handling different for these types?
2) If we look at the WAR part of the code. I see a case where nothing will happen and, even worse, the code will silently just continue on. The case is if the war is expanded and shouldDeployExpanded(WAR) returns false.
3) Why is the code above handling WARs different from the one for SARs and RARs?
4) What happens if the RAR/SAR is expanded, but shouldDeployExpanded(...) returns false? Cargo will try to deploy it as not expanded I believe, which shouldn't work... I guess it will be an exception that will be caught, but this ought to be possible to handle in a more elegant way I think.

Discussion on the dev list:


Savas Ali Tokmen


Anders Hammar

Fix versions