| | |
| | | { |
| | | for (final String jarFileName : jarFileNames) |
| | | { |
| | | final File f = new File(libDirectory, jarFileName + ".jar"); |
| | | if (f.exists()) |
| | | { |
| | | f.delete(); |
| | | } |
| | | deleteFileIfExists(new File(libDirectory, jarFileName + ".jar")); |
| | | } |
| | | } |
| | | |
| | |
| | | }; |
| | | } |
| | | |
| | | static UpgradeTask removeTools(final String... toolNames) |
| | | { |
| | | return new AbstractUpgradeTask() { |
| | | @Override |
| | | public void perform(final UpgradeContext context) throws ClientException { |
| | | for (final String toolName : toolNames) |
| | | { |
| | | deleteFileIfExists(new File(binDirectory, toolName)); |
| | | deleteFileIfExists(new File(batDirectory, toolName + ".bat")); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | /** Prevent instantiation. */ |
| | | private UpgradeTasks() |
| | | { |