From c59bf52dd18cc26ab5bbccbff1c1782d3fbed08c Mon Sep 17 00:00:00 2001 From: "siddik.acil" Date: Thu, 23 Mar 2023 18:26:51 +0100 Subject: chore(deps): Javax JSON to Jakarta JSON Move to Quarkus 3.x Beta for updating to Jakarta version of the libraries. That means moving away from org.glassfish:java.json to jakarta.json:jakarta.json-api. The new version will be released as v6.0.0. Any changes should go to both 5.x and 6.x versions until Quarkus 3.x is Final and javax.json is finally history. Points: - We might want to change the Import Order to include Jakarta. - We might want to move from Javax to Jakarta for annotation, ws etc. in the examples. --- README.adoc | 28 +++++++++++----------- core/pom.xml | 6 ++--- .../googlecloud/jsonlogging/KeyValueParameter.java | 6 ++--- .../quarkus/googlecloud/jsonlogging/LogEntry.java | 6 ++--- .../jsonlogging/StructuredParameter.java | 2 +- deployment/pom.xml | 2 +- examples/quarkus/pom.xml | 2 +- examples/spring-boot/pom.xml | 2 +- pom.xml | 4 ++-- runtime/pom.xml | 2 +- .../jsonlogging/runtime/package-info.java | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.adoc b/README.adoc index e8fbaa4..3cadf3d 100644 --- a/README.adoc +++ b/README.adoc @@ -48,7 +48,7 @@ If you are using Maven: eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging - 5.0.0 + 6.0.0 @@ -59,7 +59,7 @@ If you are using Gradle: [source,groovy] ---- dependencies { - implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:5.0.0") + implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:6.0.0") } ---- @@ -90,7 +90,7 @@ If you are using Maven: eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-core - 5.0.0 + 6.0.0 @@ -101,7 +101,7 @@ If you are using Gradle: [source,groovy] ---- dependencies { - implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging-core:5.0.0") + implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging-core:6.0.0") } ---- @@ -121,7 +121,7 @@ JBoss Log Manager as the back end for SLF4J: eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-core - 5.0.0 + 6.0.0 @@ -178,28 +178,28 @@ Logging unstructured data requires no code changes. All logs are automatically converted to Google-Cloud-Logging-compatible JSON. Structured data can be logged in one of 3 different ways: by passing -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label]s +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label]s and -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter]s +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter]s as parameters to individual log entries, by supplying -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider]s +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider]s and -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider]s, +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider]s, or by using the Mapped Diagnostic Context. === Using Label and StructuredParameter Instances of -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label] +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label] and -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter] +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter] can be passed as log parameters to the `*f` family of logging functions on JBoss Logging's https://docs.jboss.org/jbosslogging/latest/org/jboss/logging/Logger.html[Logger]. Simple key–value pairs are represented by -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.html[KeyValueParameter]. +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.html[KeyValueParameter]. **Example:** @@ -234,9 +234,9 @@ Result: === Using LabelProvider and StructuredParameterProvider Any CDI beans that implement -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider] +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider] and -https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider] +https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider] are discovered at build time and consulted to provide labels and parameters for each message that is logged. This can be used to provide contextual information such as tracing and request IDs stored diff --git a/core/pom.xml b/core/pom.xml index 601e83f..b239b3e 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 5.0.1-SNAPSHOT + 6.0.1-SNAPSHOT quarkus-googlecloud-jsonlogging-core @@ -30,8 +30,8 @@ SPDX-License-Identifier: LGPL-3.0-or-later smallrye-common-constraint - org.glassfish - jakarta.json + jakarta.json + jakarta.json-api diff --git a/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.java b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.java index ef5d06a..87a889c 100644 --- a/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.java +++ b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.java @@ -7,9 +7,9 @@ package eu.mulk.quarkus.googlecloud.jsonlogging; import java.math.BigDecimal; import java.math.BigInteger; import java.util.Objects; -import javax.json.Json; -import javax.json.JsonObjectBuilder; -import javax.json.JsonValue; +import jakarta.json.Json; +import jakarta.json.JsonObjectBuilder; +import jakarta.json.JsonValue; /** * A simple single key–value pair forming a {@link StructuredParameter}. diff --git a/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/LogEntry.java b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/LogEntry.java index dec18b2..69ebc93 100644 --- a/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/LogEntry.java +++ b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/LogEntry.java @@ -8,9 +8,9 @@ import io.smallrye.common.constraint.Nullable; import java.time.Instant; import java.util.List; import java.util.Map; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; /** * A JSON log entry compatible with Google Cloud Logging. diff --git a/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.java b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.java index c233158..17b3fe9 100644 --- a/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.java +++ b/core/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.java @@ -4,7 +4,7 @@ package eu.mulk.quarkus.googlecloud.jsonlogging; -import javax.json.JsonObjectBuilder; +import jakarta.json.JsonObjectBuilder; /** * A structured parameter usable as logging payload. diff --git a/deployment/pom.xml b/deployment/pom.xml index 009da6d..b108d38 100644 --- a/deployment/pom.xml +++ b/deployment/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 5.0.1-SNAPSHOT + 6.0.1-SNAPSHOT quarkus-googlecloud-jsonlogging-deployment diff --git a/examples/quarkus/pom.xml b/examples/quarkus/pom.xml index 6e4f042..25e4f8b 100644 --- a/examples/quarkus/pom.xml +++ b/examples/quarkus/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: GPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 5.0.0 + 6.0.0 quarkus-googlecloud-jsonlogging-quarkus-example diff --git a/examples/spring-boot/pom.xml b/examples/spring-boot/pom.xml index d646316..abd2a1b 100644 --- a/examples/spring-boot/pom.xml +++ b/examples/spring-boot/pom.xml @@ -16,7 +16,7 @@ SPDX-License-Identifier: GPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 5.0.0 + 6.0.0 quarkus-googlecloud-jsonlogging-spring-boot-example diff --git a/pom.xml b/pom.xml index 2c85c28..4ea9a00 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later 4.0.0 eu.mulk.quarkus-googlecloud-jsonlogging - 5.0.1-SNAPSHOT + 6.0.1-SNAPSHOT quarkus-googlecloud-jsonlogging-parent pom @@ -72,7 +72,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later 2.29.0 3.0.0-M7 - 2.15.1.Final + 3.0.0.Beta1 diff --git a/runtime/pom.xml b/runtime/pom.xml index 2460b15..cabd533 100644 --- a/runtime/pom.xml +++ b/runtime/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 5.0.1-SNAPSHOT + 6.0.1-SNAPSHOT quarkus-googlecloud-jsonlogging diff --git a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java index 0c87a85..5df9885 100644 --- a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java +++ b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java @@ -43,7 +43,7 @@ * * eu.mulk.quarkus-googlecloud-jsonlogging * quarkus-googlecloud-jsonlogging - * 5.0.0 + * 6.0.0 * * * ... @@ -59,7 +59,7 @@ * dependencies { * // ... * - * implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:5.0.0") + * implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:6.0.0") * * // ... * } -- cgit v1.2.3 From 21805f62218f2a48cac18fcda4712893b14d3c79 Mon Sep 17 00:00:00 2001 From: "siddik.acil" Date: Fri, 24 Mar 2023 08:58:35 +0100 Subject: 6.0.0-SNAPSHOT --- core/pom.xml | 2 +- deployment/pom.xml | 2 +- pom.xml | 2 +- runtime/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index b239b3e..53fe709 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 6.0.1-SNAPSHOT + 6.0.0-SNAPSHOT quarkus-googlecloud-jsonlogging-core diff --git a/deployment/pom.xml b/deployment/pom.xml index b108d38..9093a82 100644 --- a/deployment/pom.xml +++ b/deployment/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 6.0.1-SNAPSHOT + 6.0.0-SNAPSHOT quarkus-googlecloud-jsonlogging-deployment diff --git a/pom.xml b/pom.xml index 4ea9a00..9ac0105 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later 4.0.0 eu.mulk.quarkus-googlecloud-jsonlogging - 6.0.1-SNAPSHOT + 6.0.0-SNAPSHOT quarkus-googlecloud-jsonlogging-parent pom diff --git a/runtime/pom.xml b/runtime/pom.xml index cabd533..d5506f8 100644 --- a/runtime/pom.xml +++ b/runtime/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later eu.mulk.quarkus-googlecloud-jsonlogging quarkus-googlecloud-jsonlogging-parent - 6.0.1-SNAPSHOT + 6.0.0-SNAPSHOT quarkus-googlecloud-jsonlogging -- cgit v1.2.3 From ca9b92912a0090af5e3c24ab922ffdc0849869e5 Mon Sep 17 00:00:00 2001 From: "siddik.acil" Date: Fri, 24 Mar 2023 09:54:22 +0100 Subject: Eclipse Parsson --- core/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 53fe709..20713c2 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -30,8 +30,8 @@ SPDX-License-Identifier: LGPL-3.0-or-later smallrye-common-constraint - jakarta.json - jakarta.json-api + org.eclipse.parsson + parsson -- cgit v1.2.3 From 0c4bbce114364c4af10fe1d05cf2157434150f23 Mon Sep 17 00:00:00 2001 From: "siddik.acil" Date: Fri, 24 Mar 2023 09:54:36 +0100 Subject: Update Spring Boot Example --- examples/spring-boot/pom.xml | 2 +- .../eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/spring-boot/pom.xml b/examples/spring-boot/pom.xml index abd2a1b..2940c66 100644 --- a/examples/spring-boot/pom.xml +++ b/examples/spring-boot/pom.xml @@ -23,7 +23,7 @@ SPDX-License-Identifier: GPL-3.0-or-later Quarkus Google Cloud JSON Logging Extension - Spring Boot Example - 2.7.3 + 3.0.4 diff --git a/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java b/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java index 78331ce..a2b824a 100644 --- a/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java +++ b/examples/spring-boot/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java @@ -6,7 +6,7 @@ package eu.mulk.quarkus.googlecloud.jsonlogging.example; import eu.mulk.quarkus.googlecloud.jsonlogging.KeyValueParameter; import eu.mulk.quarkus.googlecloud.jsonlogging.Label; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import org.jboss.logging.Logger; import org.jboss.logging.MDC; import org.springframework.web.bind.annotation.GetMapping; -- cgit v1.2.3 From 195c2674fe3e914be20385afdb1482fab8ca8d02 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 24 Mar 2023 10:58:57 +0100 Subject: Update Quarkus example. Change-Id: Ia52fac7ab966761d4a9eebc6fbf615ab5c97697d --- .../jsonlogging/example/RandomNumberParameterProvider.java | 2 +- .../quarkus/googlecloud/jsonlogging/example/RootResource.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java b/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java index 5d70079..65654e6 100644 --- a/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java +++ b/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java @@ -8,8 +8,8 @@ import eu.mulk.quarkus.googlecloud.jsonlogging.KeyValueParameter; import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameter; import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider; import io.quarkus.arc.Unremovable; +import jakarta.inject.Singleton; import java.util.concurrent.ThreadLocalRandom; -import javax.inject.Singleton; @Singleton @Unremovable diff --git a/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java b/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java index eb4443b..72eaba3 100644 --- a/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java +++ b/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RootResource.java @@ -6,11 +6,11 @@ package eu.mulk.quarkus.googlecloud.jsonlogging.example; import eu.mulk.quarkus.googlecloud.jsonlogging.KeyValueParameter; import eu.mulk.quarkus.googlecloud.jsonlogging.Label; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; import org.jboss.logging.Logger; import org.jboss.logging.MDC; -- cgit v1.2.3