private Properties prepareUndeployActionProperties(String archiveName, String target) { DeploymentProperties dProps = new DeploymentProperties(); // we need to find the application registration name // which is not always the same as archive name String appName = archiveName; List<Application> applications = apps.getApplications(); for (Application app : applications) { String defaultAppName = app.getDeployProperties().getProperty (DeploymentProperties.DEFAULT_APP_NAME); if (defaultAppName != null && defaultAppName.equals(archiveName)) { appName = app.getName(); } } dProps.setName(appName); // dProps.setResourceAction(DeploymentProperties.RES_UNDEPLOYMENT); // dProps.setResourceTargetList(target); return (Properties)dProps; }
private static Properties getDeployActionProperties( File deployablefile, boolean enabled, String virtualServer, boolean forceDeploy, boolean verify, boolean jspPreCompilation, String target){ DeploymentProperties dProps = new DeploymentProperties(); dProps.setPath(deployablefile.getAbsolutePath()); // dProps.setUpload(false); dProps.setEnabled(enabled); if (virtualServer != null) { dProps.setVirtualServers(virtualServer); } dProps.setForce(forceDeploy); dProps.setVerify(verify); dProps.setPrecompileJSP(jspPreCompilation); // dProps.setResourceAction(DeploymentProperties.RES_DEPLOYMENT); // dProps.setResourceTargetList(target); dProps.setProperty(DeploymentProperties.LOG_REPORTED_ERRORS, "false"); return (Properties)dProps; } }