elasticsearch/elasticsearch — pull request #2364 by imotov (2012-10-29 01:31:55+00:00)
Title: Simplify plugin installation troubleshooting

Add check for write access to plugins directory before trying to install plugin. Support verbose mode that prints out intermediate exceptions. Don't install plugin is plugin directory already exists. Fixes #2357

This pull request should simplify troubleshooting of two difficult to troubleshoot issues that can occur during a plugin installation. The first issue occurs when a user doesn't have write access to the plugin directory and is currently difficult to troubleshoot due to confusing error message. The second issue occurs during a plugin upgrade, when the previous version of the plugin is already installed. If the new version contains jars that are different from the installed version, new jars are currently installed side-by-side with old jars, which creates installation that may or may not work depending on the order of plugin jars in the classpath.