Geode's codebase is broken up into a number of gradle subprojects, all called with geode-XXX. These will be referred to as geode modules in this document. These modules all get bundled up as part of the geode distribution by geode-assembly. Each one of these becomes it's own jar file which users generally consume through maven or as part of the code that is running on a geode server when the server is launched through gfsh start server.


The biggest module by far is geode-core, which contains the geode public API. The process for creating a module is different depending on whether the module you are creating should be a required dependency of geode-core, or an potentially optional add on which itself depends on geode-core.


Creating a module that geode-core depends on

This is the process for modules which are required dependencies of geode-core. Let's say your new module is called foo.

  1. Add a geode-foo directory, parallel with all of the rest of the geode-XXX directories.
  2. Add a build.gradle file in the geode-foo directory.
    1. You will probably want to copy from an existing build.gradle file, for example geode-tcp-server. Remove the dependencies you don't need
  3. Add geode-foo to geode/settings.gradle
  4. Add geode-foo as a dependency in geode-core/build.gradle. Generally, you want this to be an implementation dependency, unless the module has *public* API classes that users of geode-core's public API will need to access. Implementation means that it will not be part of the compile time classpath for consumers of geode-core.
    e.g.  implementation(project(':geode-tcp-server'))
  5. Add geode-foo to TomcatInstall's list of jars
  6. Add geode-foo to to modify_war
  7. Add your module into the geode-assembly/build.gradle
  8. After you’ve added all those dependencies you have to run this command to update the expected POMs that will be uploaded to maven central
    1.      ./gradlew updateExpectedPom
    2.   note if you have to rebase during the time it takes to create your new module you may need to re-run this command
    3.  also worth noting is that your new module might create "expected-pom.xml" files in directories that you are not focused upon... be sure to `git add` those files or CI will complain
  9. Now you should be able to build, unless you have missed adding your module to that module needing it:
    1. e.g.   geode-foo2's build.gradle:

      implementation(project(':geode-tcp-server'))
  10. Make these tests pass:
  • GeodeDependencyJarIntegrationTest
  • AssemblyContentsIntegrationTest
  • BundledJarsJUnitTest


  • No labels