mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
106705: Made findManifest and backup public so they can be reused. UTF-77 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@106796 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -397,7 +397,7 @@ public class ModuleManagementTool implements LogOutput
|
||||
* @see ModuleManagementTool#installModule(String, String, boolean, boolean, boolean)
|
||||
*
|
||||
* @param warFile the location of the AMP file to be installed
|
||||
* @param warFileLocation the location of the WAR file into which the AMP file is to be installed
|
||||
* @param backupWAR true if you want it to perform the backup
|
||||
*/
|
||||
private void backupWar(TFile warFile, boolean backupWAR) throws IOException
|
||||
{
|
||||
@@ -405,24 +405,7 @@ public class ModuleManagementTool implements LogOutput
|
||||
// Make a backup of the war we are going to modify
|
||||
if (backupWAR == true)
|
||||
{
|
||||
|
||||
String backupLocation = warFile.getAbsolutePath()+"-" + System.currentTimeMillis() + ".bak";
|
||||
|
||||
if (warFile.isArchive())
|
||||
{
|
||||
outputVerboseMessage("Backing up WAR file...");
|
||||
TFile source = new TFile(warFile.getAbsolutePath(), TArchiveDetector.NULL);
|
||||
TFile backup = new TFile(backupLocation, TArchiveDetector.NULL);
|
||||
source.cp_rp(backup); //Just copy the file
|
||||
}
|
||||
else
|
||||
{
|
||||
outputVerboseMessage("Backing up war DIRECTORY...");
|
||||
TFile backup = new TFile(backupLocation);
|
||||
warFile.cp_rp(backup); //Copy the directory
|
||||
}
|
||||
outputVerboseMessage("WAR has been backed up to '" + backupLocation + "'");
|
||||
|
||||
warHelper.backup(warFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user