Skip to content

Switch to gradle build system #13930

@rjernst

Description

@rjernst

We currently have a very large maven build system, comprising of 6k lines of xml. While maven parent POMs have been very useful in de-duplicating build logic across elasticsearch and plugins, the rigidity of maven has required us to begin implementing most of our test logic through maven-antrun-plugin. Another major problem with multi-module builds is trap: building a module requires explicitly listing an upstream module in order to get a local build of the dependency, or building from a higher level module (which implicitly builds all sub-modules). And finally, the maven model is incapable of decoupling test dependencies from main dependencies, in that tests for module A, cannot depend on module B, which in turn depends on module A (this is not a cycle).

I have a branch which contains elasticsearch switched to using gradle:
https://github.com/elastic/elasticsearch/tree/burn_maven_with_fire

This is a tracking issue for completing the migration to gradle. The tasks are separated into two groups: those remaining required before pushing to master (as to not completely break development), and those required for the migration to be complete, which must happen before the next release (tentatively 2.2).

Required for master push:

  • Maven publishing
  • Windows integ test support
  • Setup publishing of buildSrc (ie ES gradle build plugins)
  • Publish "attach project plugin" (allows dynamically including a multi-project build inside another build)

Required for release:

Addtional nice to haves:

  • Make qa plugins work in eclipse (need to configure custom classpath)
  • Add run task for elasticsearch and plugins to replace run.sh/run.bat: fixing run.bat and run.sh #14451

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions