-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch maven/gradle plugin #21119
Comments
For maven, this plugin exists for years now: https://github.com/alexcojocaru/elasticsearch-maven-plugin BTW I wrote some guide to do that without a plugin using maven and ant: |
Nice! I wonder if we should have something as part of our build so we don't break it. That plugin looks wonderful though! |
For gradle, it also exists already as part of our build tools. This is what the qa projects use, |
For the transport client as well as for the test framework it would be nice to have tests that check whether the dependencies can be properly consumed (from Maven/Gradle/SBT) when using a local maven repo with all dependencies properly packaged. This would consist of a simple build file and a sample class file that connects to an Elasticsearch instance running locally and executing a few commands. We could then have assertions on the exact output we expect. We could then publish the same code as part of the documentation. |
@ywelsch that makes sense to me. I think maybe that is a separate issue that is blocked on having this. |
Pinging @elastic/es-core-infra |
This can be closed. While we still don't have any official maven plugin for testing like this, something does exist, and it is not a priority to provide something officially. |
It would be nice to have at least one example of a custom plugin along with the integration tests and a testing cluster setup. Sadly, not everything can be solved using the standalone analyzers and there's pretty much nothing to encourage developers into creating new plugins. In order to create a new plugin, I have to dig very deep into the ES code and spend weeks by eventually finding out that something that would make sense was deprecated in favor of something that's overly complicated. Disappointing. :( |
@jsmucr we are sorry you feel that way. |
@atorok I created the tests I currently use by reusing parts of the Elasticsearch test suite itself. Honestly, I didn't look at the examples much because I'm only interested in EDI files analysis. So in the end I ended up testing my plugin the same way you (I mean the devs) test the analysis plugins officially. But then I started to have problems with testing the plugin using the same mapping I use in the production because of lack of the standard analyzers and filters in the embedded ES. This led me here only to learn that the official way of testing is deprecated. Later I figured out that it's not completely true that the functionality I was after isn't available. Just the tokenizer and filter factories were missing and unpublished. So I reimplemented these factories and republished it under my own name just for the testing purposes. |
Now that we're quite explicit about not supporting embedded Elasticsearch, maybe we can made a maven and a gradle plugin to that jvm projects can use to start Elasticsearch before running their integration tests?
It'd certainly be nice to have one.
The text was updated successfully, but these errors were encountered: