private void renameApplicationToApplicationName() throws MojoFailureException { if (!FilenameUtils.getBaseName(application.getName()).equals(applicationName)) { try { File destApplication = new File(application.getParentFile(), applicationName + ".zip"); FileUtils.copyFile(application, destApplication); application = destApplication; } catch (IOException e) { throw new MojoFailureException("Couldn't rename [" + application + "] to [" + applicationName + "]"); } } }
public static String getMuleAppConfiguration(String muleConfig) { String directory = FilenameUtils.getFullPath(muleConfig); String muleAppConfiguration = directory + MuleServer.DEFAULT_APP_CONFIGURATION; return muleAppConfiguration; }
final String ext = FilenameUtils.getExtension(descriptorFile.getName()); final DescriptorParser descriptorParser = parserRegistry.get(ext);
private void undeploy(File muleHome) throws MojoExecutionException { File appsDir = new File(muleHome + "/apps/"); for (File file : appsDir.listFiles()) { if (FilenameUtils.getBaseName(file.getName()).equals(applicationName)) { try { log.debug("Deleting " + file); FileUtils.forceDelete(file); return; } catch (IOException e) { log.error("Could not delete " + file.getAbsolutePath()); throw new MojoExecutionException("Could not delete directory [" + file.getAbsolutePath() + "]", e); } } } throw new MojoExecutionException("Application " + applicationName + " not found."); } }
for (int j = 0; j < topLevelDirsToIgnore.length; j++) { String ignored = topLevelDirsToIgnore[j]; if (ignored.equals(FilenameUtils.getBaseName(files[i].getName()))) { break OUTER;
if (ignored.equals(FilenameUtils.getBaseName(files[i].getName())))
final String baseName = FilenameUtils.getBaseName(artifactUrl.toString()); if (baseName.contains("%20")) artifactName = FilenameUtils.getBaseName(fullPath); artifactDir = new File(artifactParentDir, artifactName);
final String contextName = FilenameUtils.getBaseName(tempDir.toString()); serverId = contextName;