Dependency Management
Apache Cassandra manages dependencies through two mechanisms: git submodules for tightly coupled projects, and the lib/ directory for third-party libraries.
Git Submodules
Cassandra uses git submodules for dependencies where cross-cutting changes are common. The primary submodule is Accord, the consensus protocol implementation.
Development Branches
When starting work on a JIRA ticket, create matching branches across submodules:
.build/sh/development-switch.sh --jira CASSANDRA-<number>
Updating Submodule References
After making changes to a submodule:
(cd modules/accord ; git commit -am 'Description of change')
.build/sh/bump-accord.sh
See Contributing Code Changes for the full submodule merge workflow.
Third-Party Libraries
Third-party dependencies are stored in the lib/ directory.
All libraries must be compatible with the Apache License.
License information for each dependency is maintained in lib/licenses/.
When adding or updating a third-party library:
-
Place the JAR in
lib/ -
Add or update the corresponding license file in
lib/licenses/ -
Ensure the license is Apache-compatible (Category A or B per ASF policy)
The build enforces license compliance using the Apache RAT tool. See Code Style for details on license header requirements.