Dependency Management
[DISCUSS] thread on the dev@cassandra.apache.org mailing list.
software license requirements.
build.xml file to separate POM template files that are processed by Ant. In both pre-5.0 and post-5.0 Cassandra, there are several POMs that dependencies can be included in:
parent-pom
Contains all dependencies with the respective version. All other poms will refer to the artifacts with specified versions listed here.
parent-pomtemplate is.build/parent-pom-template.xml.build-deps-pom(-sources) + coverage-deps-pom
ant buildtarget. Listed dependencies will be resolved and copied tobuild/lib/{jar,sources}by executing themaven-ant-tasks-retrieve-buildtarget. This should contain libraries that are required for build tools (grammar, docs, instrumentation), but are not shipped as part of the Cassandra distribution.coverage-deps-pomhas been removed and thebuild-deps-pomtemplate is.build/cassandra-build-deps-template.xml.all-pom
cassandra-all.jar. See release process docs.
all-pomtemplate is.build/cassandra-deps-template.xml.test-deps-pom
maven-ant-tasks-retrieve-testto retrieve and save dependencies tobuild/test/lib. Exclusively used during JUnit test execution.test-deps-pomhas been removed.ant write-pomstarget produces valid POM files in thebuild/directory.lib/directory are built into the release artifacts by theant artifactstarget (see targetresolver-dist-lib). Libraries distributed this way must meet the ASF distribution policy.Dependency management before Cassandra 5.0
build.xml. The parent POM should include thedependencytag withgroupId,artifactId,version, and optionalscopefields. The child POM(s) should include thedependencytag withgroupIdandartifactId. See the Maven docs for a complete reference on how to reference dependencies across parent and child POMs. an example of a commit that changes dependency versions pre-5.0.Dependency management in Cassandra 5.0 and later
.build/*-template.xml. These templates are processed into valid Maven POMs and copied tobuild/\*.pomby theant write-pomstask.parent-pom-templateandcassandra-deps-template, and optionallycassandra-build-deps-templateif the dependency is required for build only. See the Maven docs on how to reference dependencies in the parent POM from the child POMs.build.xmlandparent-pom-template, specify the version as a property inbuild.xml, add it to theant write-pomstarget, then add the property toparent-pom-templatewith the value of the template substitution. an example of a commit that changes dependency versions since 5.0.Troubleshooting and conflict resolution
Here are some useful commands that may help you out resolving conflicts.ant realclean- gets rid of the build directory, including build artifacts.mvn dependency:tree -f build/apache-cassandra-\*-SNAPSHOT.pom -Dverbose -Dincludes=org.slf4jant mvn-install.rm ~/.m2/repository/org/apache/cassandra/apache-cassandra/- removes cached local Cassandra maven artifacts
