mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
75090: Merged WAT2 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 74391: Better logging/messages from the mmt git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@75418 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -6,7 +6,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
|
||||
import org.alfresco.repo.module.ModuleDetailsImpl;
|
||||
@@ -54,12 +53,14 @@ public class WarHelperImpl implements WarHelper
|
||||
TFile propsFile = new TFile(war+VERSION_PROPERTIES);
|
||||
if (propsFile != null && propsFile.exists())
|
||||
{
|
||||
log.info("INFO: Checking the war version using "+VERSION_PROPERTIES);
|
||||
Properties warVers = loadProperties(propsFile);
|
||||
VersionNumber warVersion = new VersionNumber(warVers.getProperty("version.major")+"."+warVers.getProperty("version.minor")+"."+warVers.getProperty("version.revision"));
|
||||
checkVersions(warVersion, installingModuleDetails);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.info("INFO: Checking the war version using the manifest.");
|
||||
checkCompatibleVersionUsingManifest(war,installingModuleDetails);
|
||||
}
|
||||
}
|
||||
@@ -142,10 +143,12 @@ public class WarHelperImpl implements WarHelper
|
||||
private void checkVersions(VersionNumber warVersion, ModuleDetails installingModuleDetails) throws ModuleManagementToolException
|
||||
{
|
||||
if(warVersion.compareTo(installingModuleDetails.getRepoVersionMin())==-1) {
|
||||
throw new ModuleManagementToolException("The module ("+installingModuleDetails.getTitle()+") must be installed on a war version greater than "+installingModuleDetails.getRepoVersionMin());
|
||||
throw new ModuleManagementToolException("The module ("+installingModuleDetails.getTitle()+") must be installed on a war version greater than "
|
||||
+installingModuleDetails.getRepoVersionMin()+". This war is version:"+warVersion+".");
|
||||
}
|
||||
if(warVersion.compareTo(installingModuleDetails.getRepoVersionMax())==1) {
|
||||
throw new ModuleManagementToolException("The module ("+installingModuleDetails.getTitle()+") cannot be installed on a war version greater than "+installingModuleDetails.getRepoVersionMax());
|
||||
throw new ModuleManagementToolException("The module ("+installingModuleDetails.getTitle()+") cannot be installed on a war version greater than "
|
||||
+installingModuleDetails.getRepoVersionMax()+". This war is version:"+warVersion+".");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user