+ depActualVersion + ". They must exactly match.");
}
// check dependencies for included modules recursively
checkDependencyVersion(dependentModule.getDependentModule(), result);
} else {
VersionUtility.VersionComparator vc = new VersionComparator();
if (vc.compare(depDefinedVersion, depActualVersion) == 1) {
result.addError(SystemValidationType.MODULE_ERROR, module.getName()
+ " defines dependency on " + dependentModule.getDependentModule().getName()
+ " start version " + depDefinedVersion + ", but actual version in DB is "
+ depActualVersion);
} else if (dependentModule.getLastVersion() == null
&& vc.compareMajorVersions(depDefinedVersion, depActualVersion) != 0) {
result.addError(SystemValidationType.MODULE_ERROR, module.getName()
+ " defines dependency on " + dependentModule.getDependentModule().getName()
+ " start version " + depDefinedVersion + ", but actual version in DB is "
+ depActualVersion + ". Which has a different major version.");
} else if (dependentModule.getLastVersion() != null
&& vc.compare(depActualVersion, dependentModule.getLastVersion()) == 1) {
result.addError(SystemValidationType.MODULE_ERROR, module.getName()
+ " defines dependency on " + dependentModule.getDependentModule().getName()
+ " end version " + dependentModule.getLastVersion()
+ ", but actual version in DB is " + depActualVersion);
}