/** * {@inheritDoc} */ @Override public void undeploy(Deployable deployable) { // If necessary, warn the user about this deployer's limitations warn(); String deployableFilename = getDeployableDir(deployable) + "/" + getDeployableName(deployable); getFileHandler().delete(deployableFilename); }
/** * {@inheritDoc} */ @Override public void undeploy(Deployable deployable) { // If necessary, warn the user about this deployer's limitations warn(); String deployableFilename = getDeployableDir(deployable) + "/" + getDeployableName(deployable); getFileHandler().delete(deployableFilename); }
/** * Undeploy the file in specified directory with the specified file name. * * @param directory The directory name * @param file The file name */ private void undeployFile(String directory, String file) { String fileName = getFileHandler().append(directory, file); if (fileExists(fileName)) { getLogger().info("Undeploying [" + fileName + "]...", this.getClass().getName()); getFileHandler().delete(fileName); } else { getLogger().info( "Couldn't not find file to undeploy [" + fileName + "]", this.getClass().getName()); } }
/** * Undeploy the file in specified directory with the specified file name. * * @param directory The directory name * @param file The file name */ private void undeployFile(String directory, String file) { String fileName = getFileHandler().append(directory, file); if (fileExists(fileName)) { getLogger().info("Undeploying [" + fileName + "]...", this.getClass().getName()); getFileHandler().delete(fileName); } else { getLogger().info( "Couldn't not find file to undeploy [" + fileName + "]", this.getClass().getName()); } }
+ "]...", this.getClass().getName()); getFileHandler().delete(serverDir.getAbsolutePath());
/** * Removes previously deployed artifact. * * @param deployable artifact to undeploy */ @Override public void undeploy(Deployable deployable) { if (deployable.getType() != DeployableType.WAR) { super.undeploy(deployable); return; } WAR war = (WAR) deployable; String fileName = getFileHandler().append(getDeployableDir(deployable), war.getContext() + ".war"); if (getFileHandler().exists(fileName)) { getLogger().info("Undeploying [" + fileName + "]...", this.getClass().getName()); getFileHandler().delete(fileName); } }
/** * Removes previously deployed artifact. * * @param deployable artifact to undeploy */ @Override public void undeploy(Deployable deployable) { if (deployable.getType() != DeployableType.WAR) { super.undeploy(deployable); return; } WAR war = (WAR) deployable; String fileName = getFileHandler().append(getDeployableDir(deployable), war.getContext() + ".war"); if (getFileHandler().exists(fileName)) { getLogger().info("Undeploying [" + fileName + "]...", this.getClass().getName()); getFileHandler().delete(fileName); } }
/** * Delete old profile. * @throws Exception if any error is raised during deleting of profile */ private void deleteOldProfile() throws Exception { getLogger().info("Deleting old profile.", this.getClass().getName()); // Delete profile in WebSphere wsContainer.runManageProfileCommand( "-delete", "-profileName", getPropertyValue(WebSpherePropertySet.PROFILE)); // Profile directory has to be deleted too. getLogger().debug("Deleting profile folder " + getHome(), this.getClass().getName()); getFileHandler().delete(getHome()); if (getFileHandler().isDirectory(getHome())) { throw new CargoException("Directory " + getHome() + " cannot be deleted"); } // Update profile informations in WebSphere wsContainer.runManageProfileCommand("-validateAndUpdateRegistry"); }
((WebLogicConfiguration) getConfiguration()).getDomainHome(), "cargodeploy"); String targetDirectoryname = fileHandler.append(cargodeploy, war.getContext()); fileHandler.delete(targetDirectoryname); String targetFilename = fileHandler.append(cargodeploy, war.getContext() + ".war"); fileHandler.delete(targetFilename); if (deployable.isExpanded())
((WebLogicConfiguration) getConfiguration()).getDomainHome(), "cargodeploy"); String targetDirectoryname = fileHandler.append(cargodeploy, war.getContext()); fileHandler.delete(targetDirectoryname); String targetFilename = fileHandler.append(cargodeploy, war.getContext() + ".war"); fileHandler.delete(targetFilename); if (deployable.isExpanded())
getFileHandler().copyFile(defaultConfigurationXML, customConfigurationXML); getFileHandler().copyFile(tempFile, defaultConfigurationXML); getFileHandler().delete(tempFile);
getFileHandler().copyFile(defaultConfigurationXML, customConfigurationXML); getFileHandler().copyFile(tempFile, defaultConfigurationXML); getFileHandler().delete(tempFile);
ear.execute(); getFileHandler().delete(tmpDir.getAbsolutePath());
ear.execute(); getFileHandler().delete(tmpDir.getAbsolutePath());
getFileHandler().delete(tmpDir);
|| !getFileHandler().exists(getHome())) getFileHandler().delete(getHome());