From 97d134060abbcec65b8b9fcbc7df8620477e231a Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Thu, 1 Sep 2022 12:03:58 -0700 Subject: [PATCH 01/13] Add docs for dependency management changes in CASSANDRA-17750 --- .../ROOT/pages/development/dependencies.adoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 58c4a709d..1a8b3adf2 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -12,13 +12,26 @@ As Cassandra is an Apache product, all included libraries must follow Apache's https://www.apache.org/legal/resolved.html[software license requirements]. +=== Changes to dependency management in Cassandra 4.1 + +Before Cassandra 4.1, dependencies were managed in `build.xml` and managed with +Maven Ant Tasks. In Cassandra 4.1 and onwards, dependencies are managed in POM +templates in `.build/`. New dependencies should be added to the parent POM +template and necessary child POMs. See +https://issues.apache.org/jira/browse/CASSANDRA-17750[CASSANDRA-17750] for more +information. + === Required steps to add or update libraries * Add or replace jar file in `lib` directory * Add or update `lib/license` files -* Update dependencies in `build.xml` +* Update dependencies in `build.xml` (pre-4.1) or POM templates in `.build/` (4.1 onwards) +* If dependencies are managed in `build.xml` (pre-4.1): ** Add to `parent-pom` with correct version ** Add to `all-pom` if simple Cassandra dependency (see below) +* If dependencies are managed in POM templates in `.build/` (4.1 onwards): +** Add dependency to `.build/parent-pom-template.xml` with correct version and optional scope and classifier +** Add dependency to `.build/cassandra-deps-template.xml` and optionally `.build/cassandra-build-deps-template.xml` with references to parent POM === POM file types From dd7af1c0802daecb573bb6adff6d07c88e297822 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Thu, 1 Sep 2022 12:21:50 -0700 Subject: [PATCH 02/13] 4.1 -> 4.2 --- .../modules/ROOT/pages/development/dependencies.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 1a8b3adf2..21c37846c 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -12,10 +12,10 @@ As Cassandra is an Apache product, all included libraries must follow Apache's https://www.apache.org/legal/resolved.html[software license requirements]. -=== Changes to dependency management in Cassandra 4.1 +=== Changes to dependency management in Cassandra 4.2 -Before Cassandra 4.1, dependencies were managed in `build.xml` and managed with -Maven Ant Tasks. In Cassandra 4.1 and onwards, dependencies are managed in POM +Before Cassandra 4.2, dependencies were managed in `build.xml` and managed with +Maven Ant Tasks. In Cassandra 4.2 and onwards, dependencies are managed in POM templates in `.build/`. New dependencies should be added to the parent POM template and necessary child POMs. See https://issues.apache.org/jira/browse/CASSANDRA-17750[CASSANDRA-17750] for more @@ -25,11 +25,11 @@ information. * Add or replace jar file in `lib` directory * Add or update `lib/license` files -* Update dependencies in `build.xml` (pre-4.1) or POM templates in `.build/` (4.1 onwards) -* If dependencies are managed in `build.xml` (pre-4.1): +* Update dependencies in `build.xml` (pre-4.2) or POM templates in `.build/` (4.2 onwards) +* If dependencies are managed in `build.xml` (pre-4.2): ** Add to `parent-pom` with correct version ** Add to `all-pom` if simple Cassandra dependency (see below) -* If dependencies are managed in POM templates in `.build/` (4.1 onwards): +* If dependencies are managed in POM templates in `.build/` (4.2 onwards): ** Add dependency to `.build/parent-pom-template.xml` with correct version and optional scope and classifier ** Add dependency to `.build/cassandra-deps-template.xml` and optionally `.build/cassandra-build-deps-template.xml` with references to parent POM From 1b81c58eced52dc692fb32c45217e6f2c45240f9 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Thu, 1 Sep 2022 12:53:09 -0700 Subject: [PATCH 03/13] Expand documentation --- .../ROOT/pages/development/dependencies.adoc | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 21c37846c..3fc969b97 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -15,11 +15,31 @@ requirements]. === Changes to dependency management in Cassandra 4.2 Before Cassandra 4.2, dependencies were managed in `build.xml` and managed with -Maven Ant Tasks. In Cassandra 4.2 and onwards, dependencies are managed in POM -templates in `.build/`. New dependencies should be added to the parent POM -template and necessary child POMs. See -https://issues.apache.org/jira/browse/CASSANDRA-17750[CASSANDRA-17750] for more -information. +Maven Ant Tasks. In Cassandra 4.2 and onwards, dependencies are managed in +Maven POM templates in `.build/*-template.xml`. These templates are processed +into valid Maven POMs with the `ant write-poms` task and copied to +`build/*.pom`. + +The following POMs from `build.xml` have been migrated to templates: +* `parent-pom` is now at `.build/parent-pom-template.xml` +* `all-pom` is now at `.build/cassandra-deps-template.xml` +* `build-deps-pom` is now at `.build/cassandra-build-deps-template.xml` + +To add new dependencies in Cassandra 4.2 onwards, add the dependency to +`parent-pom-template` and `cassandra-deps-template`, and optionally +`cassandra-build-deps-template` if the dependency is required for build only. +See +https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management[the +Maven docs] on how to reference dependencies in the parent POM from the child +POMs. + +For dependency versions that need to be available in `build.xml` and +`parent-pom-template`, specify the version as a property in `build.xml`, add it +to the `ant write-poms` target, then add the property to `parent-pom-template` +with the value of the template substitution. + +For more information on this change, see +https://issues.apache.org/jira/browse/CASSANDRA-17750[CASSANDRA-17750]. === Required steps to add or update libraries From 23f2f8215b2e5e67d64674755e3a24f36df24bb0 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Thu, 1 Sep 2022 13:42:41 -0700 Subject: [PATCH 04/13] Rm outdated lib steps --- .../source/modules/ROOT/pages/development/dependencies.adoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 3fc969b97..897541c46 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -43,8 +43,6 @@ https://issues.apache.org/jira/browse/CASSANDRA-17750[CASSANDRA-17750]. === Required steps to add or update libraries -* Add or replace jar file in `lib` directory -* Add or update `lib/license` files * Update dependencies in `build.xml` (pre-4.2) or POM templates in `.build/` (4.2 onwards) * If dependencies are managed in `build.xml` (pre-4.2): ** Add to `parent-pom` with correct version From 0411c2c67c79f038c925ee72d6dcb620de2661db Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Thu, 1 Sep 2022 14:00:33 -0700 Subject: [PATCH 05/13] Separate pre-4.2 and post-4.2 documentation per feedback --- .../ROOT/pages/development/dependencies.adoc | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 897541c46..20a12af73 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -12,13 +12,11 @@ As Cassandra is an Apache product, all included libraries must follow Apache's https://www.apache.org/legal/resolved.html[software license requirements]. -=== Changes to dependency management in Cassandra 4.2 +=== Dependency management in Cassandra 4.2 and onwards -Before Cassandra 4.2, dependencies were managed in `build.xml` and managed with -Maven Ant Tasks. In Cassandra 4.2 and onwards, dependencies are managed in -Maven POM templates in `.build/*-template.xml`. These templates are processed -into valid Maven POMs with the `ant write-poms` task and copied to -`build/*.pom`. +In Cassandra 4.2 and onwards, dependencies are managed in Maven POM templates +in `.build/*-template.xml`. These templates are processed into valid Maven POMs +with the `ant write-poms` task and copied to `build/*.pom`. The following POMs from `build.xml` have been migrated to templates: * `parent-pom` is now at `.build/parent-pom-template.xml` @@ -41,15 +39,14 @@ with the value of the template substitution. For more information on this change, see https://issues.apache.org/jira/browse/CASSANDRA-17750[CASSANDRA-17750]. -=== Required steps to add or update libraries +=== Dependency management before Cassandra 4.2 + +Before Cassandra 4.2, dependencies were managed in `build.xml` and managed with +Maven Ant Tasks. -* Update dependencies in `build.xml` (pre-4.2) or POM templates in `.build/` (4.2 onwards) -* If dependencies are managed in `build.xml` (pre-4.2): +* Update dependencies in `build.xml` ** Add to `parent-pom` with correct version ** Add to `all-pom` if simple Cassandra dependency (see below) -* If dependencies are managed in POM templates in `.build/` (4.2 onwards): -** Add dependency to `.build/parent-pom-template.xml` with correct version and optional scope and classifier -** Add dependency to `.build/cassandra-deps-template.xml` and optionally `.build/cassandra-build-deps-template.xml` with references to parent POM === POM file types From ed4d65a848ebd057a494658a063005bbd8570a05 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Mon, 5 Sep 2022 18:32:35 -0700 Subject: [PATCH 06/13] Update intro --- .../modules/ROOT/pages/development/dependencies.adoc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 20a12af73..f1dd021b3 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -2,11 +2,8 @@ == Dependency Management -Managing libraries for Cassandra is a bit less straight forward compared -to other projects, as the build process is based on ant, maven and -manually managed jars. Make sure to follow the steps below carefully and -pay attention to any emerging issues in the `ci` and reported related -issues on Jira/ML, in case of any project dependency changes. +New dependencies should not be included without community consensus first being +obtained via a `[DISCUSS]` thread on the dev@cassandra.apache.org mailing list. As Cassandra is an Apache product, all included libraries must follow Apache's https://www.apache.org/legal/resolved.html[software license From 62c7546280aca592a9c0d1104794b820e56ec0c9 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Tue, 31 Oct 2023 18:28:53 -0400 Subject: [PATCH 07/13] Updates based on Claude Warren's feedback --- .../ROOT/pages/development/dependencies.adoc | 100 ++++++++++-------- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index f1dd021b3..f562b9653 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -9,60 +9,68 @@ As Cassandra is an Apache product, all included libraries must follow Apache's https://www.apache.org/legal/resolved.html[software license requirements]. -=== Dependency management in Cassandra 4.2 and onwards +Cassandra uses the Ant build system and Maven POMs for dependency specification. +In Cassandra 4.2 the format of POMs was moved from within the `build.xml` file to separate POM template files that are processed by Ant. +In both pre-4.2 and post-4.2 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. + - Since Cassandra 4.2, the `parent-pom` template is `.build/parent-pom-template.xml`. +* *build-deps-pom(-sources)* + *coverage-deps-pom* + - used by the `ant build` target. Listed dependencies will be resolved and + copied to `build/lib/{jar,sources}` by executing the + `maven-ant-tasks-retrieve-build` target. This should contain libraries that are + required for build tools (grammar, docs, instrumentation), but are not + shipped as part of the Cassandra distribution. + - Since Cassandra 4.0, `coverage-deps-pom` has been removed and the + `build-deps-pom` template is `.build/cassandra-build-deps-template.xml`. +* *all-pom* + - POM for https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-all[cassandra-all.jar] + that can be installed or deployed to public maven repos via `ant publish`. + - Since Cassandra 4.2, the `all-pom` template is `.build/cassandra-deps-template.xml`. +* *test-deps-pom* + - Referenced by `maven-ant-tasks-retrieve-test` to retrieve and save + dependencies to `build/test/lib`. Exclusively used during JUnit test + execution. + - Since Cassandra 3.0, `test-deps-pom` has been removed. + +The `ant write-poms` target produces valid POM files in the `build/` directory. -In Cassandra 4.2 and onwards, dependencies are managed in Maven POM templates -in `.build/*-template.xml`. These templates are processed into valid Maven POMs -with the `ant write-poms` task and copied to `build/*.pom`. +=== Dependency management before Cassandra 4.2 + +To update dependencies, update the parent and child POM definitions in +`build.xml`. The parent POM should include the `dependency` tag with `groupId`, +`artifactId`, `version`, and optional `scope` fields. The child POM(s) should +include the `dependency` tag with `groupId` and `artifactId`. See the +https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management[Maven docs] +for a complete reference on how to reference dependencies across parent and +child POMs. + +Here is +https://github.com/apache/cassandra/commit/4b3f07fc74089151efeff7a8fdfa9c414a1f0d6a#diff-766797f233c18114f9499750cf1ffbf3829aeea50283850619c01bd173132021[an example] +of a commit that changes dependency versions pre-4.2. + +=== Dependency management in Cassandra 4.2 and later -The following POMs from `build.xml` have been migrated to templates: -* `parent-pom` is now at `.build/parent-pom-template.xml` -* `all-pom` is now at `.build/cassandra-deps-template.xml` -* `build-deps-pom` is now at `.build/cassandra-build-deps-template.xml` +In Cassandra 4.2 and later, dependencies are managed in Maven POM templates in +`.build/\*-template.xml`. These templates are processed into valid Maven POMs +and copied to `build/\*.pom` the `ant write-poms` task. -To add new dependencies in Cassandra 4.2 onwards, add the dependency to -`parent-pom-template` and `cassandra-deps-template`, and optionally -`cassandra-build-deps-template` if the dependency is required for build only. -See -https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management[the -Maven docs] on how to reference dependencies in the parent POM from the child -POMs. +For new dependencies, add to `parent-pom-template` and +`cassandra-deps-template`, and optionally `cassandra-build-deps-template` if +the dependency is required for build only. See +https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management[the Maven docs] +on how to reference dependencies in the parent POM from the child POMs. For dependency versions that need to be available in `build.xml` and `parent-pom-template`, specify the version as a property in `build.xml`, add it to the `ant write-poms` target, then add the property to `parent-pom-template` with the value of the template substitution. -For more information on this change, see -https://issues.apache.org/jira/browse/CASSANDRA-17750[CASSANDRA-17750]. - -=== Dependency management before Cassandra 4.2 - -Before Cassandra 4.2, dependencies were managed in `build.xml` and managed with -Maven Ant Tasks. - -* Update dependencies in `build.xml` -** Add to `parent-pom` with correct version -** Add to `all-pom` if simple Cassandra dependency (see below) - -=== POM file types - -* *parent-pom* - contains all dependencies with the respective version. -All other poms will refer to the artifacts with specified versions -listed here. -* *build-deps-pom(-sources)* + *coverage-deps-pom* - used by `ant build` -compile target. Listed dependenices will be resolved and copied to -`build/lib/{jar,sources}` by executing the -`maven-ant-tasks-retrieve-build` target. This should contain libraries -that are required for build tools (grammar, docs, instrumentation), but -are not shipped as part of the Cassandra distribution. -* *test-deps-pom* - refered by `maven-ant-tasks-retrieve-test` to -retrieve and save dependencies to `build/test/lib`. Exclusively used -during JUnit test execution. -* *all-pom* - pom for -https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-all[cassandra-all.jar] -that can be installed or deployed to public maven repos via -`ant publish` +Here is +https://github.com/apache/cassandra/commit/b61bd93e574503aff8c29f0efefbe9879d3b32eb[an example] +of a commit that changes dependency versions since 4.2. === Troubleshooting and conflict resolution @@ -70,7 +78,7 @@ 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.slf4j` +* `mvn dependency:tree -f build/apache-cassandra-\*-SNAPSHOT.pom -Dverbose -Dincludes=org.slf4j` - shows transitive dependency tree for artifacts, e.g. org.slf4j. In case the command above fails due to a missing parent pom file, try running `ant mvn-install`. From 1591f8edae5592fc5aa8ea9fcb8bfba68f71307d Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Wed, 1 Nov 2023 11:21:39 -0400 Subject: [PATCH 08/13] Fix typo --- .../source/modules/ROOT/pages/development/dependencies.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index f562b9653..e8fcf7e4e 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -55,7 +55,7 @@ of a commit that changes dependency versions pre-4.2. In Cassandra 4.2 and later, dependencies are managed in Maven POM templates in `.build/\*-template.xml`. These templates are processed into valid Maven POMs -and copied to `build/\*.pom` the `ant write-poms` task. +and copied to `build/\*.pom` by the `ant write-poms` task. For new dependencies, add to `parent-pom-template` and `cassandra-deps-template`, and optionally `cassandra-build-deps-template` if From c1211af6a3f2758ca265aea12294f1f55171c6b7 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Thu, 2 Nov 2023 12:32:46 -0400 Subject: [PATCH 09/13] Apache -> ASF Co-authored-by: mck --- .../source/modules/ROOT/pages/development/dependencies.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index e8fcf7e4e..f0e6c9444 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -5,7 +5,7 @@ New dependencies should not be included without community consensus first being obtained via a `[DISCUSS]` thread on the dev@cassandra.apache.org mailing list. -As Cassandra is an Apache product, all included libraries must follow +As Cassandra is an ASF project, all included libraries must follow Apache's https://www.apache.org/legal/resolved.html[software license requirements]. From 1889d0904f38ac1d8f1a746d2e52d37284753ecf Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Thu, 2 Nov 2023 12:36:44 -0400 Subject: [PATCH 10/13] 4.2 -> 5.0 --- .../ROOT/pages/development/dependencies.adoc | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index f0e6c9444..3bdc2341c 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -5,18 +5,19 @@ New dependencies should not be included without community consensus first being obtained via a `[DISCUSS]` thread on the dev@cassandra.apache.org mailing list. -As Cassandra is an ASF project, all included libraries must follow -Apache's https://www.apache.org/legal/resolved.html[software license -requirements]. +As Cassandra is an ASF project, all included libraries must follow Apache's +https://www.apache.org/legal/resolved.html[software license requirements]. -Cassandra uses the Ant build system and Maven POMs for dependency specification. -In Cassandra 4.2 the format of POMs was moved from within the `build.xml` file to separate POM template files that are processed by Ant. -In both pre-4.2 and post-4.2 Cassandra, there are several POMs that dependencies can be included in: +Cassandra uses the Ant build system and Maven POMs for dependency +specification. In Cassandra 5.0 the format of POMs was moved from within the +`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. - - Since Cassandra 4.2, the `parent-pom` template is `.build/parent-pom-template.xml`. + - Since Cassandra 5.0, the `parent-pom` template is `.build/parent-pom-template.xml`. * *build-deps-pom(-sources)* + *coverage-deps-pom* - used by the `ant build` target. Listed dependencies will be resolved and copied to `build/lib/{jar,sources}` by executing the @@ -28,7 +29,7 @@ In both pre-4.2 and post-4.2 Cassandra, there are several POMs that dependencies * *all-pom* - POM for https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-all[cassandra-all.jar] that can be installed or deployed to public maven repos via `ant publish`. - - Since Cassandra 4.2, the `all-pom` template is `.build/cassandra-deps-template.xml`. + - Since Cassandra 5.0, the `all-pom` template is `.build/cassandra-deps-template.xml`. * *test-deps-pom* - Referenced by `maven-ant-tasks-retrieve-test` to retrieve and save dependencies to `build/test/lib`. Exclusively used during JUnit test @@ -37,7 +38,7 @@ In both pre-4.2 and post-4.2 Cassandra, there are several POMs that dependencies The `ant write-poms` target produces valid POM files in the `build/` directory. -=== Dependency management before Cassandra 4.2 +=== Dependency management before Cassandra 5.0 To update dependencies, update the parent and child POM definitions in `build.xml`. The parent POM should include the `dependency` tag with `groupId`, @@ -49,11 +50,11 @@ child POMs. Here is https://github.com/apache/cassandra/commit/4b3f07fc74089151efeff7a8fdfa9c414a1f0d6a#diff-766797f233c18114f9499750cf1ffbf3829aeea50283850619c01bd173132021[an example] -of a commit that changes dependency versions pre-4.2. +of a commit that changes dependency versions pre-5.0. -=== Dependency management in Cassandra 4.2 and later +=== Dependency management in Cassandra 5.0 and later -In Cassandra 4.2 and later, dependencies are managed in Maven POM templates in +In Cassandra 5.0 and later, dependencies are managed in Maven POM templates in `.build/\*-template.xml`. These templates are processed into valid Maven POMs and copied to `build/\*.pom` by the `ant write-poms` task. @@ -70,7 +71,7 @@ with the value of the template substitution. Here is https://github.com/apache/cassandra/commit/b61bd93e574503aff8c29f0efefbe9879d3b32eb[an example] -of a commit that changes dependency versions since 4.2. +of a commit that changes dependency versions since 5.0. === Troubleshooting and conflict resolution From ed2c1a54003db687b846e1d418d41b3fb41e1495 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Fri, 3 Nov 2023 14:51:09 -0400 Subject: [PATCH 11/13] Clarify release process --- .../source/modules/ROOT/pages/development/dependencies.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 3bdc2341c..6655789eb 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -27,8 +27,9 @@ can be included in: - Since Cassandra 4.0, `coverage-deps-pom` has been removed and the `build-deps-pom` template is `.build/cassandra-build-deps-template.xml`. * *all-pom* - - POM for https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-all[cassandra-all.jar] - that can be installed or deployed to public maven repos via `ant publish`. + - POM for + https://mvnrepository.com/artifact/org.apache.cassandra/cassandra-all[cassandra-all.jar]. + See https://cassandra.apache.org/_/development/release_process.html[release process docs]. - Since Cassandra 5.0, the `all-pom` template is `.build/cassandra-deps-template.xml`. * *test-deps-pom* - Referenced by `maven-ant-tasks-retrieve-test` to retrieve and save From 8a6bd37ada246e9a486b05fa4c94d6f8bb22cce3 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Mon, 6 Nov 2023 11:40:19 -0500 Subject: [PATCH 12/13] Clarify lib/ and resolver-dist-lib, per PR feedback --- .../source/modules/ROOT/pages/development/dependencies.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 6655789eb..33fd348c0 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -39,6 +39,11 @@ can be included in: The `ant write-poms` target produces valid POM files in the `build/` directory. +Dependencies added to the `lib/` directory are built into the release artifacts +by the `ant artifacts` target (see target `resolver-dist-lib`). Libraries +distributed this way must meet the +[https://www.apache.org/legal/resolved.html]ASF distribution policy. + === Dependency management before Cassandra 5.0 To update dependencies, update the parent and child POM definitions in From fd4d6f717b90bfbeecec1532eb75484c569837c8 Mon Sep 17 00:00:00 2001 From: Abe Ratnofsky Date: Mon, 6 Nov 2023 14:25:06 -0500 Subject: [PATCH 13/13] Fix link --- .../source/modules/ROOT/pages/development/dependencies.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-content/source/modules/ROOT/pages/development/dependencies.adoc b/site-content/source/modules/ROOT/pages/development/dependencies.adoc index 33fd348c0..af45e37a8 100644 --- a/site-content/source/modules/ROOT/pages/development/dependencies.adoc +++ b/site-content/source/modules/ROOT/pages/development/dependencies.adoc @@ -42,7 +42,7 @@ The `ant write-poms` target produces valid POM files in the `build/` directory. Dependencies added to the `lib/` directory are built into the release artifacts by the `ant artifacts` target (see target `resolver-dist-lib`). Libraries distributed this way must meet the -[https://www.apache.org/legal/resolved.html]ASF distribution policy. +https://www.apache.org/legal/resolved.html[ASF distribution policy]. === Dependency management before Cassandra 5.0