elasticsearch/elasticsearch — pull request #3774 by bkw (2013-09-25 11:29:35+00:00)
Title: do not silently fail on plugin install with source files

When trying to install a plugin from source files only a debug error is issued, making the plugin cli exit without an error code. This is creates problem for automated installs because the error will not be detected.

Current behavior:
```bash
ubuntu@es5:~$ sudo plugin -i elasticsearch/elasticsearch-river-wikipedia
-> Installing elasticsearch/elasticsearch-river-wikipedia...
Trying https://github.com/elasticsearch/elasticsearch-river-wikipedia/archive/master.zip...
Downloading ...........DONE
Installed elasticsearch/elasticsearch-river-wikipedia into /usr/local/elasticsearch-0.90.5/plugins/river-wikipedia
ubuntu@es5:~$ echo $?
0
ubuntu@es5:~$ plugin -l
Installed plugins:
- HQ
- head
- bigdesk
- paramedic
- browser
```

New behavior:
```bash
bkw@Aeronaut ★ ~/tmp/es/elasticsearch-1.0.0.Beta1-SNAPSHOT
> ./bin/plugin -i elasticsearch/elasticsearch-river-wikipedia
-> Installing elasticsearch/elasticsearch-river-wikipedia...
Trying https://github.com/elasticsearch/elasticsearch-river-wikipedia/archive/master.zip...
Downloading ......DONE
Installed elasticsearch/elasticsearch-river-wikipedia into /Users/bkw/tmp/es/elasticsearch-1.0.0.Beta1-SNAPSHOT/plugins/river-wikipedia
Failed to install elasticsearch/elasticsearch-river-wikipedia, reason: Plugin installation assumed to be site plugin, but contains source code, aborting installation.
bkw@Aeronaut ☄ 1 ~/tmp/es/elasticsearch-1.0.0.Beta1-SNAPSHOT
> echo $?
74
```

PR includes a dummy plugin zipfile with only one java file in it for testing.

CLA: XYVCQP8743E5W4R