Revert "Warn user when plugin dependencies don't match"

This reverts commit 2d40b7e7e9.
This commit is contained in:
Jesse Glick committed 2014-02-11 19:12:58 -05:00
1 parent 58ff576f0a
commit 3c2f5046c0
1 file changed
+6 -20
+6 -20
View File
@@ -479,33 +479,19 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
*/
/*package*/ void resolvePluginDependencies() throws IOException {
List<String> missingDependencies = new ArrayList<String>();
List<String> incompatibleDependencies = new ArrayList<String>();
// make sure dependencies exist
for (Dependency d : dependencies) {
PluginWrapper plugin = parent.getPlugin(d.shortName);
if (plugin == null || plugin.isActive()) {
if (parent.getPlugin(d.shortName) == null)
missingDependencies.add(d.toString());
} else if (new VersionNumber(plugin.getVersion()).isOlderThan(new VersionNumber(d.version))) {
incompatibleDependencies.add(d.toString());
}
}
// add the optional dependencies that exists
for (Dependency d : optionalDependencies) {
PluginWrapper plugin = parent.getPlugin(d.shortName);
if (plugin != null) {
dependencies.add(d);
} else if (new VersionNumber(plugin.getVersion()).isOlderThan(new VersionNumber(d.version))) {
incompatibleDependencies.add(d.toString());
}
}
if (!missingDependencies.isEmpty())
throw new IOException("Dependency "+Util.join(missingDependencies, ", ")+" doesn't exist");
if (!incompatibleDependencies.isEmpty())
throw new IOException("Dependency "+Util.join(incompatibleDependencies, ", ")+" doesn't match required version");
// add the optional dependencies that exists
for (Dependency d : optionalDependencies) {
if (parent.getPlugin(d.shortName) != null)
dependencies.add(d);
}
}
/**