elasticsearch-knapsack icon indicating copy to clipboard operation
elasticsearch-knapsack copied to clipboard

Question: Compile from source

Open GummyDonut opened this issue 8 years ago • 2 comments

I know this may not be the right place to ask this. However, I wish to ask, how do you compile knapsack from source? I would like to make a small modification and try to test it. Many of the guides online are out of date : https://www.elastic.co/blog/found-writing-a-plugin and thus I was wondering if you guys could show me, or at least direct me in the correct direction.

Thanks for taking the time to read this. Regards

GummyDonut avatar Jun 07 '16 13:06 GummyDonut

My plugins are developed with Gradle, which is not usual at the moment.

Simple method (without IDE)

  • Install Git, Java 8, Gradle
  • Check out source from github
  • Execute gradle clean pluginZip
  • Copy build/distributions/*.zip to Elasticsearch plugin folder & unzip (or use plugin tool)

Complex method (with IDE)

  • Install IntelliJ IDEA (Community Edition)
  • Ensure Java, Git, and Gradle IDE support is installed (this is by default)
  • Check out source from Github
  • Import into IntelliJ by File > Open
  • Open View > Tool windows > Gradle
  • Execute task clean
  • Execute task pluginZip
  • Copy build/distributions/*.zip to Elasticsearch plugin folder & unzip (or use plugin tool)

If you make changes where you think others may like it, pull requests are always welcome!

jprante avatar Jun 08 '16 18:06 jprante

Thanks I will start this as soon as possible.

GummyDonut avatar Jun 08 '16 22:06 GummyDonut