Skip to content

Commit 043bab7

Browse files
authored
Merge pull request #150 from teaql/fix/jackson-managed-131
fix: manage Jackson versions across Java runtime
2 parents 1ce9fff + eddccad commit 043bab7

6 files changed

Lines changed: 45 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
cache: maven
2525
- name: Build with Maven
2626
run: mvn -B install
27+
- name: Verify managed Jackson runtime versions
28+
run: bash scripts/verify-jackson-runtime-dependencies.sh
2729
- name: Validate error catalog
2830
run: |
2931
python3 -m unittest discover -v

‎pom.xml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4242
<spring-boot.version>3.2.0</spring-boot.version>
4343
<commons-lang3.version>3.20.0</commons-lang3.version>
44+
<jackson-bom.version>2.22.3</jackson-bom.version>
4445
</properties>
4546

4647
<modules>
@@ -89,6 +90,13 @@
8990
<artifactId>commons-lang3</artifactId>
9091
<version>${commons-lang3.version}</version>
9192
</dependency>
93+
<dependency>
94+
<groupId>com.fasterxml.jackson</groupId>
95+
<artifactId>jackson-bom</artifactId>
96+
<version>${jackson-bom.version}</version>
97+
<type>pom</type>
98+
<scope>import</scope>
99+
</dependency>
92100
<dependency>
93101
<groupId>org.springframework.boot</groupId>
94102
<artifactId>spring-boot-dependencies</artifactId>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5+
cd "$repo"
6+
7+
# Generated applications have their own dependency management. This gate
8+
# verifies published runtime modules and the parent-owned Business ID example.
9+
tree=$(mvn -B -pl '!examples/conformance/lib,!examples/conformance' \
10+
dependency:tree \
11+
-Dincludes=com.fasterxml.jackson.core:jackson-databind,com.fasterxml.jackson.core:jackson-core,com.fasterxml.jackson.core:jackson-annotations \
12+
-DoutputType=text)
13+
14+
for expected in \
15+
'jackson-databind:jar:2.22.3:' \
16+
'jackson-core:jar:2.22.3:' \
17+
'jackson-annotations:jar:2.22:'; do
18+
if [[ "$tree" != *"$expected"* ]]; then
19+
echo "Expected Jackson dependency not found: $expected" >&2
20+
exit 1
21+
fi
22+
done
23+
24+
unexpected=$(printf '%s\n' "$tree" | awk '
25+
/com\.fasterxml\.jackson\.core:jackson-databind:jar:/ && !/jackson-databind:jar:2\.22\.3:/ { print }
26+
/com\.fasterxml\.jackson\.core:jackson-core:jar:/ && !/jackson-core:jar:2\.22\.3:/ { print }
27+
/com\.fasterxml\.jackson\.core:jackson-annotations:jar:/ && !/jackson-annotations:jar:2\.22:/ { print }
28+
')
29+
if [[ -n "$unexpected" ]]; then
30+
echo "Runtime reactor resolved a conflicting Jackson version:" >&2
31+
printf '%s\n' "$unexpected" >&2
32+
exit 1
33+
fi
34+
35+
echo "PASS: runtime Jackson dependencies follow the managed BOM"

‎teaql-redis/pom.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
<dependency>
3535
<groupId>com.fasterxml.jackson.core</groupId>
3636
<artifactId>jackson-databind</artifactId>
37-
<version>2.16.1</version>
3837
</dependency>
3938
</dependencies>
4039
</project>

‎teaql-sql-portable/pom.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
<dependency>
3131
<groupId>com.fasterxml.jackson.core</groupId>
3232
<artifactId>jackson-databind</artifactId>
33-
<version>2.13.5</version>
3433
</dependency>
3534

3635
<!-- Testing dependencies -->

‎teaql-utils-json/pom.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<dependency>
2222
<groupId>com.fasterxml.jackson.core</groupId>
2323
<artifactId>jackson-databind</artifactId>
24-
<version>2.13.5</version>
2524
</dependency>
2625
<dependency>
2726
<groupId>org.junit.jupiter</groupId>

0 commit comments

Comments
 (0)