Skip to content

Conversation

Copy link

Copilot AI commented Dec 30, 2025

The version 4.19.0.5-SNAPSHOT was hardcoded in 10 locations throughout bom/pom.xml, making version updates error-prone and difficult to maintain.

Changes

  • Introduced java.driver.version property to centralize version definition
  • Replaced hardcoded versions in 9 dependency declarations with ${java.driver.version}
  • Fixed trademark formatting: Cassandra(R)Cassandra (R)
  • Configured flatten-maven-plugin to expand properties in dependencyManagement section
<properties>
  <java.driver.version>4.19.0.5-SNAPSHOT</java.driver.version>
</properties>
<parent>
  <groupId>com.scylladb</groupId>
  <artifactId>java-driver-parent</artifactId>
  <version>4.19.0.5-SNAPSHOT</version>
</parent>

Note: The <parent><version> must remain hardcoded because Maven requires the parent POM to be resolved before child properties are available. The property is used in all 9 dependency declarations, and the flatten-maven-plugin is configured to expand these properties in the published BOM artifact.

Original prompt
Please apply the following diffs and create a pull request.
Once the PR is ready, give it a title based on the messages of the fixes being applied.

[{"message":"The version number is hardcoded and repeated multiple times throughout the file. Consider using a property to define the version once and reference it in all dependency declarations to improve maintainability.","fixFiles":[{"filePath":"bom/pom.xml","diff":"diff --git a/bom/pom.xml b/bom/pom.xml\n--- a/bom/pom.xml\n+++ b/bom/pom.xml\n@@ -25,10 +25,13 @@\n -->\n <project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n   <modelVersion>4.0.0</modelVersion>\n+  <properties>\n+    <java.driver.version>4.19.0.3-SNAPSHOT</java.driver.version>\n+  </properties>\n   <parent>\n     <groupId>com.scylladb</groupId>\n     <artifactId>java-driver-parent</artifactId>\n-    <version>4.19.0.3-SNAPSHOT</version>\n+    <version>${java.driver.version}</version>\n   </parent>\n   <artifactId>java-driver-bom</artifactId>\n   <packaging>pom</packaging>\n@@ -38,47 +38,47 @@\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-core</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-core-shaded</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-mapper-processor</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-mapper-runtime</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-query-builder</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-guava-shaded</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-test-infra</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-metrics-micrometer</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n         <artifactId>java-driver-metrics-microprofile</artifactId>\n-        <version>4.19.0.3-SNAPSHOT</version>\n+        <version>${java.driver.version}</version>\n       </dependency>\n       <dependency>\n         <groupId>com.scylladb</groupId>\n"}]},{"message":"[nitpick] Missing space before the opening parenthesis in 'Cassandra(R)'. It should be 'Cassandra (R)' for proper formatting.","fixFiles":[{"filePath":"bom/pom.xml","diff":"diff --git a/bom/pom.xml b/bom/pom.xml\n--- a/bom/pom.xml\n+++ b/bom/pom.xml\n@@ -32,7 +32,7 @@\n   </parent>\n   <artifactId>java-driver-bom</artifactId>\n   <packaging>pom</packaging>\n-  <name>Java driver for Scylla and Apache Cassandra(R) - Bill Of Materials</name>\n+  <name>Java driver for Scylla and Apache Cassandra (R) - Bill Of Materials</name>\n   <dependencyManagement>\n     <dependencies>\n       <dependency>\n"}]}]

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…sandra trademark formatting

Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor version number to improve maintainability Use property for version management in BOM pom.xml Dec 30, 2025
Copilot AI requested a review from mykaul December 30, 2025 16:23
@dkropachev
Copy link

@mykaul it broke the whole thing

@mykaul
Copy link

mykaul commented Jan 1, 2026

@mykaul it broke the whole thing

That's OK - let me (or CoPi) take a look at this first, before I waste your time on it.

@mykaul
Copy link

mykaul commented Jan 1, 2026

@copilot - look at all CI failures - fix'em!

Copilot AI and others added 2 commits January 1, 2026 08:01
…dencies

Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
… and fix XML formatting

Co-authored-by: mykaul <4655593+mykaul@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 1, 2026

@copilot - look at all CI failures - fix'em!

Fixed! The issue was that Maven cannot resolve properties in the <parent><version> tag. I've updated the fix to:

  1. Keep hardcoded version in the parent reference
  2. Use the property only for the 9 dependency declarations
  3. Configure flatten-maven-plugin to expand properties properly

Commits: c357abf and 22fdcf9

Copilot AI requested a review from mykaul January 1, 2026 08:08
@mykaul mykaul marked this pull request as ready for review January 1, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants