gradle idea to import the elasticsearch source to IntelliJ and now can run and debug the source. Now I want to start my elasticsearch instance in IntelliJ with a plugin installed(for instance the
jvm-example from master) in the same project. How can i do this ?
There are actually 5 options I can think of:
- Write a unit test (extends ESTestCase). These run in your IDE no problem.
- Write a semi-integration test (extends ESIntegTestCase). There also run in your IDE no problem.
gradle run --debug-jvm. For
jvm-exampleyou need to do
gradle :plugins:jvm-example:run --debug-jvm. That will start Elasticsearch for remote debugging and wait until something connects on port 8000. You can just interact with Elasticsearch with CURL.
- Write an integration test (extends ESRestTestCase). These run in your IDE by first starting Elasticsearch like in step 3 and adding
-Dtests.rest.cluster=localhost:9200to the VM arguments for the test.
- Run all the integration tests with
--debug-jvm. It looks like
gradle :plugins:jvm-example:integTest --debug-jvm. This is just like number 3 except it kicks off the integration tests as soon as you unblock Elasticsearch.