From 104192693bd9db726722de6cb4cbb15616a98aed Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 15:45:00 +0530 Subject: [PATCH 1/8] Exclude netty-buffer and jackson-annotations from the native-jar --- native/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/native/build.gradle b/native/build.gradle index 3180ba5b..6a85e2e2 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -43,6 +43,8 @@ dependencies { dist (group: 'com.azure', name: 'azure-messaging-servicebus', version: "${azureServiceBusVersion}") { exclude group: "com.fasterxml.woodstox", module: "woodstox-core" exclude group: "org.codehaus.woodstox", module: "stax2-api" + exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations" + exclude group: "io.netty", module: "netty-buffer" } } From 068b951e92c068a01604e29aec148bf04a45ab4b Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 15:45:56 +0530 Subject: [PATCH 2/8] Revert "Exclude netty-buffer and jackson-annotations from the native-jar" This reverts commit 104192693bd9db726722de6cb4cbb15616a98aed. --- native/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/native/build.gradle b/native/build.gradle index 6a85e2e2..3180ba5b 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -43,8 +43,6 @@ dependencies { dist (group: 'com.azure', name: 'azure-messaging-servicebus', version: "${azureServiceBusVersion}") { exclude group: "com.fasterxml.woodstox", module: "woodstox-core" exclude group: "org.codehaus.woodstox", module: "stax2-api" - exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations" - exclude group: "io.netty", module: "netty-buffer" } } From c3d37f33152304c45b335cb8a5a0f618d3e60692 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 15:46:26 +0530 Subject: [PATCH 3/8] Exclude netty-buffer and jackson-annotations from the native-jar --- native/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/native/build.gradle b/native/build.gradle index 3180ba5b..6a85e2e2 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -43,6 +43,8 @@ dependencies { dist (group: 'com.azure', name: 'azure-messaging-servicebus', version: "${azureServiceBusVersion}") { exclude group: "com.fasterxml.woodstox", module: "woodstox-core" exclude group: "org.codehaus.woodstox", module: "stax2-api" + exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations" + exclude group: "io.netty", module: "netty-buffer" } } From 21776d3f4afa61e8543454f0d31487746e221173 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 16:00:05 +0530 Subject: [PATCH 4/8] [Automated] Update the toml files --- ballerina/Ballerina.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index c2d95a58..82ea5dbe 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -21,3 +21,15 @@ artifactId = "asb-native" module = "asb-native" version = "3.8.1-SNAPSHOT" path = "../native/build/libs/asb-native-3.8.1-SNAPSHOT.jar" + +[[platform.java11.dependency]] +groupId = "com.fasterxml.jackson.core" +artifactId = "jackson-databind" +version = "2.17.0" +path = "./lib/jackson-databind-2.17.0.jar" + +[[platform.java11.dependency]] +groupId = "com.fasterxml.jackson.core" +artifactId = "jackson-databind" +version = "2.17.0" +path = "./lib/jackson-databind-2.17.0.jar" From 646e56e0e037d5247abdecd88a87f7b2df2392e9 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 16:05:02 +0530 Subject: [PATCH 5/8] [Automated] Update the toml files --- ballerina/Ballerina.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 82ea5dbe..953205bd 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -22,14 +22,14 @@ module = "asb-native" version = "3.8.1-SNAPSHOT" path = "../native/build/libs/asb-native-3.8.1-SNAPSHOT.jar" -[[platform.java11.dependency]] +[[platform.java17.dependency]] groupId = "com.fasterxml.jackson.core" -artifactId = "jackson-databind" +artifactId = "jackson-annotations" version = "2.17.0" -path = "./lib/jackson-databind-2.17.0.jar" +path = "./lib/jackson-annotations-2.17.0.jar" -[[platform.java11.dependency]] -groupId = "com.fasterxml.jackson.core" -artifactId = "jackson-databind" -version = "2.17.0" -path = "./lib/jackson-databind-2.17.0.jar" +[[platform.java17.dependency]] +groupId = "io.netty" +artifactId = "netty-buffer" +version = "4.1.94.Final" +path = "./lib/netty-buffer-4.1.94.Final.jar" From 871efbce663f085759449b9854ee987eb5910da6 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 16:56:04 +0530 Subject: [PATCH 6/8] [Automated] Update the toml files --- ballerina/Ballerina.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 953205bd..d8a38e34 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -25,8 +25,8 @@ path = "../native/build/libs/asb-native-3.8.1-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "com.fasterxml.jackson.core" artifactId = "jackson-annotations" -version = "2.17.0" -path = "./lib/jackson-annotations-2.17.0.jar" +version = "2.13.5" +path = "./lib/jackson-annotations-2.13.5.jar" [[platform.java17.dependency]] groupId = "io.netty" From 9803dfa8afd5dcb989d9c20f80807d5acb2ed613 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 16:56:45 +0530 Subject: [PATCH 7/8] Configure netty-buffer and jackson-annotations as platform dependencies --- ballerina/build.gradle | 11 +++++++++++ build-config/resources/Ballerina.toml | 12 ++++++++++++ gradle.properties | 2 ++ 3 files changed, 25 insertions(+) diff --git a/ballerina/build.gradle b/ballerina/build.gradle index 0ff3a024..ef0fcb63 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -56,10 +56,21 @@ configurations { externalJars } +dependencies { + externalJars(group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}") { + transitive = false + } + externalJars(group: 'io.netty', name: 'netty-buffer', version: "${nettyVersion}") { + transitive = false + } +} + task updateTomlFiles { doLast { def newBallerinaToml = ballerinaTomlFilePlaceHolder.text.replace("@project.version@", project.version) newBallerinaToml = newBallerinaToml.replace("@toml.version@", tomlVersion) + newBallerinaToml = newBallerinaToml.replace("@jackson.version@", project.jacksonVersion) + newBallerinaToml = newBallerinaToml.replace("@netty.version@", project.nettyVersion) ballerinaTomlFile.text = newBallerinaToml } } diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index dfc73447..b75a9e66 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -21,3 +21,15 @@ artifactId = "asb-native" module = "asb-native" version = "@project.version@" path = "../native/build/libs/asb-native-@project.version@.jar" + +[[platform.java17.dependency]] +groupId = "com.fasterxml.jackson.core" +artifactId = "jackson-annotations" +version = "@jackson.version@" +path = "./lib/jackson-annotations-@jackson.version@.jar" + +[[platform.java17.dependency]] +groupId = "io.netty" +artifactId = "netty-buffer" +version = "@netty.version@" +path = "./lib/netty-buffer-@netty.version@.jar" diff --git a/gradle.properties b/gradle.properties index 3e5492cd..d6f39e75 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,3 +12,5 @@ ballerinaGradlePluginVersion=2.2.4 ballerinaLangVersion=2201.8.0 azureServiceBusVersion=7.14.3 slf4jVersion=1.7.30 +nettyVersion=4.1.94.Final +jacksonVersion=2.13.5 From 0c849267c46e30c52044c3c1832619d7fc678bfd Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Tue, 1 Oct 2024 16:59:21 +0530 Subject: [PATCH 8/8] Update changelog --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index a68ea914..3665b800 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- [Application written with `ballerina/asb` connector gives a conflicting JAR warning with `netty-buffer` and `jackson-annotations`](https://github.com/ballerina-platform/ballerina-library/issues/7061) + ## [3.8.1] - 2024-09-30 ### Fixed