/** * Installs all modules within a folder into the given WAR file. * @throws IOException * * @see #installModule(String, String, boolean, boolean, boolean) */ public void installModules(String directory, String warFileLocation) throws IOException { installModules(directory, warFileLocation, false, false, true); }
/** * Installs all modules within a folder into the given WAR file. * @throws IOException * * @see #installModule(String, String, boolean, boolean, boolean) */ public void installModules(String directory, String warFileLocation) throws IOException { installModules(directory, warFileLocation, false, false, true); }
private void installModules(java.io.File dir, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) { java.io.File[] children = dir.listFiles(); if (children != null) { for (java.io.File child : children) { if (child.isFile() == true && child.getName().toLowerCase().endsWith(".amp") == true) { installModule(child.getPath(), warFileLocation, preview, forceInstall, backupWAR); } else { installModules(child, warFileLocation, preview, forceInstall, backupWAR); } } } }
private void installModules(java.io.File dir, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) { java.io.File[] children = dir.listFiles(); if (children != null) { for (java.io.File child : children) { if (child.isFile() == true && child.getName().toLowerCase().endsWith(".amp") == true) { installModule(child.getPath(), warFileLocation, preview, forceInstall, backupWAR); } else { installModules(child, warFileLocation, preview, forceInstall, backupWAR); } } } }
public void installModules(String directoryLocation, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) throws IOException { java.io.File dir = new java.io.File(directoryLocation); if (dir.exists() == true) { if (backupWAR) { backupWar(new TFile(warFileLocation),true); backupWAR = false; //Set it to false so a backup doesn't occur again. } installModules(dir, warFileLocation, preview, forceInstall,backupWAR); } else { throw new ModuleManagementToolException("Invalid directory '" + directoryLocation + "'"); } }
public void installModules(String directoryLocation, String warFileLocation, boolean preview, boolean forceInstall, boolean backupWAR) throws IOException { java.io.File dir = new java.io.File(directoryLocation); if (dir.exists() == true) { if (backupWAR) { backupWar(new TFile(warFileLocation),true); backupWAR = false; //Set it to false so a backup doesn't occur again. } installModules(dir, warFileLocation, preview, forceInstall,backupWAR); } else { throw new ModuleManagementToolException("Invalid directory '" + directoryLocation + "'"); } }
getLog().info("Installing all AMPs from directory " + ampLocation.getAbsolutePath() + " into WAR/exploded webapp at " + warLocation.getAbsolutePath()); mmt.installModules(ampLocation.getAbsolutePath(), warLocation.getAbsolutePath(), false, // preview
manager.installModules(aepFileLocation, warFileLocation, previewInstall, forceInstall, backup);
manager.installModules(aepFileLocation, warFileLocation, previewInstall, forceInstall, backup);
public void testInstallFromDir() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v1.amp"); String ampV2Location = getFileLocation(".amp", "module/test_v2.amp"); int index = ampV2Location.lastIndexOf(File.separator); System.out.println(index); String directoryLocation = ampV2Location.substring(0, index); try { this.manager.installModules(directoryLocation, warLocation); } catch (ModuleManagementToolException exception) { exception.printStackTrace(); System.out.println("Expected failure: " + exception.getMessage()); } }