if (file == null || !file.exists()) {
logger.error("Failed to download plugin {}", url);
return false;
}
Version oldVersion = pf4j.getPlugin(pluginId).getDescriptor().getVersion();
if (removePlugin(pluginId, false)) {
String newPluginId = pf4j.loadPlugin(file);
if (StringUtils.isEmpty(newPluginId)) {
logger.error("Failed to load plugin {}", file);
return false;