Skip to content

Commit

Permalink
Override postgresql version defined by spring-boot-dependencies (#1416)
Browse files Browse the repository at this point in the history
## 🎫 Ticket

https://jira.cms.gov/browse/AB2D-6397

## 🛠 Changes
- In the parent POM, rename property from `postgres.version` to
`postgresql.version` to properly override version defined in
`spring-boot-dependencies`.
- Bump postgresql version to 42.7.4 to be consistent with #1412

## ℹ️ Context

The postgres version defined by `spring-boot-dependencies` is 42.3.8.
Snyk flags this version as vulnerable.

Modules **common** and **job** override this version to 42.7.3. However,
when another module imports one of these modules, Maven does not select
this overridden version and instead selects the version defined by
`spring-boot-dependencies`.

## 🧪 Validation

Running `mvn dependency:tree` on **main** shows different versions being
used for different modules.
On the feature branch, the same version is used across all modules. 


![image](https://github.com/user-attachments/assets/720540df-5485-4f97-ad1f-17df44319aab)
  • Loading branch information
bennavapbc authored Nov 12, 2024
1 parent b7f5262 commit 554c4ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgres.version}</version>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
Expand Down
2 changes: 1 addition & 1 deletion job/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgres.version}</version>
<version>${postgresql.version}</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<logback-encoder.version>7.3</logback-encoder.version>
<testcontainers.version>1.18.3</testcontainers.version>
<newrelic.version>8.15.0</newrelic.version>
<postgres.version>42.7.3</postgres.version>
<postgresql.version>42.7.4</postgresql.version>
<spring-cloud-aws.version>2.4.4</spring-cloud-aws.version>

<!-- Maven plugin versions -->
Expand Down

0 comments on commit 554c4ee

Please sign in to comment.