# How to build Elasticsearch plugin with graddle

**URL:** https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117
**Category:** Elasticsearch
**Created:** [April 16, 2019, 3:54pm UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117 "2019-04-16T15:54:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![dbakti7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakti7/32/42250_2.png) [@dbakti7](https://discuss.elastic.co/u/dbakti7)
#### Post date: [April 16, 2019, 3:54pm UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117/1 "2019-04-16T15:54:07Z")

</div>

Is there any good documentation or discussion thread with instructions on how to build Elasticsearch plugin with graddle?  
graddle assemble from root directory seems to be only building Elasticsearch and excludes the plugin directories. I can't find any good documentation on how to develop (build in particular) plugins so far.  
PS. Building with maven is also acceptable, as long as some decent documentation on how-to exists.

---

<div class="post-metadata">

### Author: ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)
#### Post date: [April 19, 2019, 7:03pm UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117/2 "2019-04-19T19:03:46Z")

</div>

It's difficult to diagnose your issue without some more information. Could you please show which command line you are trying to run and what output you get?

---

<div class="post-metadata">

### Author: ![sdauletau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sdauletau/32/24779_2.png) [@sdauletau](https://discuss.elastic.co/u/sdauletau)
#### Post date: [April 19, 2019, 8:36pm UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117/3 "2019-04-19T20:36:23Z")

</div>

I have a plugin that is built with graddle. Take a look.

> **[sdauletau/elasticsearch-position-similarity](https://github.com/sdauletau/elasticsearch-position-similarity)**
>
> Elasticsearch term position similarity plugin. Contribute to sdauletau/elasticsearch-position-similarity development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![dbakti7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakti7/32/42250_2.png) [@dbakti7](https://discuss.elastic.co/u/dbakti7)
#### Post date: [April 22, 2019, 7:34am UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117/4 "2019-04-22T07:34:50Z")

</div>

@rjernst @sdauletau  
I keep encountering:  
`Could not get unknown property 'classesDir' for test classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.`

I am using jdk-11, and trying to build for Elasticsearch 6.0  
Should I use specific jdk or gradle version for this?

@sdauletau I get the same error when trying to build your plugin, thanks for sharing btw 🙂

---

<div class="post-metadata">

### Author: ![sdauletau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sdauletau/32/24779_2.png) [@sdauletau](https://discuss.elastic.co/u/sdauletau)
#### Post date: [April 22, 2019, 11:04am UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117/5 "2019-04-22T11:04:22Z")

</div>

I have branches for 6.1.0, 6.2.0 and 6.5.4 in my repo. They all use gradle-4.5.

> <https://github.com/sdauletau/elasticsearch-position-similarity/blob/6.1.0/gradle/wrapper/gradle-wrapper.properties>

---

<div class="post-metadata">

### Author: ![dbakti7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakti7/32/42250_2.png) [@dbakti7](https://discuss.elastic.co/u/dbakti7)
#### Post date: [April 23, 2019, 6:33am UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117/6 "2019-04-23T06:33:47Z")

</div>

@sdauletau It's indeed caused by gradle version I think, I am using gradle 5.3.  
Using gradle 4.5 works..  
Thanks a lot!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 21, 2019, 6:33am UTC](https://discuss.elastic.co/t/how-to-build-elasticsearch-plugin-with-graddle/177117/7 "2019-05-21T06:33:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
