Skip to content

Design doc: Parent POM for Kite Applications

rdblue edited this page Dec 15, 2014 · 1 revision

Purpose

This outlines the design of the kite-app-parent module, which defines a POM file that Kite applications can inherit from to automatically configure their project for Kite and Hadoop dependencies. The goals of this module are to:

  1. Enable app developers to focus on their app, not configuring maven
  2. Clean up rough edges in Hadoop dependency management
  3. Provide a recommended base configuration that can be copied and modified
  4. Expose the kite-maven-plugin

Specifics

The parent POM file will handle Kite dependency management, recommended plugin configurations, and repositories.

Dependency management

Kite's data project is divided into several modules, with different purposes. While it's a good way to manage the project and allow dependencies to be fine-tuned, it is more setup work than simply depending on a single artifact. In addition, Kite itself brings in several ecosystem dependencies that currently need exclusions and other modifications to work together. The ecosystem dependencies should be provided because they will be supplied by the runtime cluster.

A parent POM can set up dependencies that will be inherited by child application POMs, including provided dependencies that can't be included transitively. Inheriting from a Kite-managed POM enables application developers to configure their build for both Kite and Hadoop in a few lines. The result is not a minimal set of dependencies, but it is a reasonable set that can be adjusted later using the parent as a reference.

Working with Hadoop versions

While Kite is compatible with several different Hadoop profiles, applications built on Kite might not be. To avoid imposing a particular version of Hadoop on application developers, overriding a profile property, kite.hadoop.profile should select the correct versions and artifacts for supported profiles:

  • Upstream Apache
  • CDH5.x
  • CDH4.x

Recommended plugin configurations

Adding recommended plugin configurations in pluginManagement will enable application developers to "turn on" development patterns recommended by Kite, by adding a plugin entry rather than pasting opaque configuration blocks. For example, maintaining a configuration for the avro-maven-plugin makes it easier for application developers to use specific Avro types, by adding just the groupId/artifactId to the plugins list and dropping .avsc files in the correct source directory. This would also expose the kite-maven-plugin.