mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed : ALF-12532: MMT should fail with an error if the target war file doesn't exist
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33725 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -201,7 +201,12 @@ public class ModuleManagementTool
|
||||
try
|
||||
{
|
||||
outputMessage("Installing AMP '" + ampFileLocation + "' into WAR '" + warFileLocation + "'");
|
||||
|
||||
java.io.File theWar = new File(warFileLocation, DETECTOR_AMP_AND_WAR);
|
||||
if (!theWar.exists())
|
||||
{
|
||||
throw new ModuleManagementToolException("The war file '" + warFileLocation + "' does not exist.");
|
||||
}
|
||||
if (preview == false)
|
||||
{
|
||||
// Make sure the module and backup directory exisits in the WAR file
|
||||
@@ -220,10 +225,6 @@ public class ModuleManagementTool
|
||||
if (backupWAR == true)
|
||||
{
|
||||
java.io.File warFile = new java.io.File(warFileLocation);
|
||||
if (warFile.exists() == false)
|
||||
{
|
||||
throw new ModuleManagementToolException("The war file '" + warFileLocation + "' does not exist.");
|
||||
}
|
||||
String backupLocation = warFileLocation + "-" + System.currentTimeMillis() + ".bak";
|
||||
java.io.File backup = new java.io.File(backupLocation);
|
||||
copyFile(warFile, backup);
|
||||
|
Reference in New Issue
Block a user