if ("WAR".equalsIgnoreCase(extension)) {
WAR war = createWAR(f);
if (!StringUtils.isEmpty(contextPath)) {
war.setContext(contextPath);
}
deployer.redeploy(war);
} else if ("EAR".equalsIgnoreCase(extension)) {
EAR ear = createEAR(f);
deployer.redeploy(ear);
} else {
throw new RuntimeException("Extension File Error.");