How to build Elasticsearch plugin with graddle

(Dian Bakti) #1

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.

(Ryan Ernst) #2

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?

(Sergei Dauletau) #3

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

(Dian Bakti) #4

@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 :slight_smile:

(Sergei Dauletau) #5

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

(Dian Bakti) #6

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