There are two variants to plugins, the first, are the ones that comes built
in elasticsearch, and the others, are ones hosted outside of elasticsearch.

In 0.17, there was push to try and create more external friendly plugin
system. The hope is that the built in plugins in elasticsearch will slowly
move to their own projects (hosted on github) and installed directly from
there.

The idea is that you create the plugin as a project (on github for example).
No need to fork the full elasticsearch codebase, just add it as a dependency
so you can build and package your plugin. You can choose your own build
system (maven, gradle, ant) for that.

The packaging of the plugin should end up generating a zip file that is
similar in nature to the other plugins. The simplest include the plugin and
dependencies jar files within it.

Once you have that, you can upload the zip file to github. You can (and
should) use your own versioning, you don't have to use elasticsearch
versioning (cause then you will need to release a new plugin version each
time elasticsearch is released).

The file you end up storing on github (under downloads) should be named
something like: beast-0.4.zip (0.4 is the version number). You can
potentially prefix it with either elasticsearch or es, for example:
elasticsearch-beast-0.4.zip. Then, installing it is simple:

bin/plugin -install sexy/beast/0.4

One thing that I would love to get into the elasticsearch repo is a plugin
template, that includes the template files, with build all configured (using
maven or gradle). So you can just get that template and start writing a
plugin easily.

The file you end up storing on github (under downloads) should be named
something like: beast-0.4.zip (0.4 is the version number). You can
potentially prefix it with either elasticsearch or es, for example:
elasticsearch-beast-0.4.zip. Then, installing it is simple:
bin/plugin -install sexy/beast/0.4

One thing that I would love to get into the elasticsearch repo is a plugin
template, that includes the template files, with build all configured (using
maven or gradle). So you can just get that template and start writing a
plugin easily.

That would be great. I was thinking about plugins lately and if it was
possible to execute a certain task. I was able to do it and I wanted
to share my results. However, I wanted to write the code in Java
instead of Scala so that more people can understand it. My only
limitation was that I needed to learn gradle (not hard, just did not
have the time). A sample gradle build file for plugins would be
great, especially when it comes to packaging.

The file you end up storing on github (under downloads) should be named
something like: beast-0.4.zip (0.4 is the version number). You can
potentially prefix it with either elasticsearch or es, for example:
elasticsearch-beast-0.4.zip. Then, installing it is simple:
bin/plugin -install sexy/beast/0.4

Github plugins will not accept a filename that starts with "elasticsearch-
"

The name is just removed so it won't be "installed" using that name, but
just using the descriptive name, the download link will include
elasticsearch-.

The inverse holds true for plugins installed locally.

One thing that I would love to get into the elasticsearch repo is a
plugin
template, that includes the template files, with build all configured
(using
maven or gradle). So you can just get that template and start writing a
plugin easily.

That would be great. I was thinking about plugins lately and if it was
possible to execute a certain task. I was able to do it and I wanted
to share my results. However, I wanted to write the code in Java
instead of Scala so that more people can understand it. My only
limitation was that I needed to learn gradle (not hard, just did not
have the time). A sample gradle build file for plugins would be
great, especially when it comes to packaging.

It doesn't have to be gradle, it can be maven (for the plugin template).
Probably the more common option for people.

It doesn't have to be gradle, it can be maven (for the plugin template).
Probably the more common option for people.

I just needed an excuse to learn Gradle. Plus, I have not touched
Maven in over a year and do not want to! Technically, the
scala-build-tool handles Java source files without an issue, but I
would not want anyone to have to download a build system for a simple
plugin.

It doesn't have to be gradle, it can be maven (for the plugin template).
Probably the more common option for people.

I just needed an excuse to learn Gradle. Plus, I have not touched
Maven in over a year and do not want to! Technically, the
scala-build-tool handles Java source files without an issue, but I
would not want anyone to have to download a build system for a simple
plugin.