From d63c350a497ce2c8da597648608bf1ca04bd4454 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Nov 2022 15:03:26 +0000 Subject: [PATCH 1/9] Bump powsybl.version from 4.10.1 to 5.0.0 Bumps `powsybl.version` from 4.10.1 to 5.0.0. Updates `powsybl-cgmes-conversion` from 4.10.1 to 5.0.0 Updates `powsybl-triple-store-impl-rdf4j` from 4.10.1 to 5.0.0 --- updated-dependencies: - dependency-name: com.powsybl:powsybl-cgmes-conversion dependency-type: direct:production update-type: version-update:semver-major - dependency-name: com.powsybl:powsybl-triple-store-impl-rdf4j dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 291a93c..af1537a 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ SPDX-License-Identifier: Apache-2.0 2.14.0.Final 3.0 2.0.3 - 4.10.1 + 5.0.0 1.5.3.Final 0.9.1 From 73c80ecda1b73b0ee95f17c7e8a6814a1f7134bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:08:00 +0000 Subject: [PATCH 2/9] Bump quarkus.platform.version from 2.14.0.Final to 2.14.1.Final Bumps `quarkus.platform.version` from 2.14.0.Final to 2.14.1.Final. Updates `quarkus-universe-bom` from 2.14.0.Final to 2.14.1.Final - [Release notes](https://github.com/quarkusio/quarkus-platform/releases) - [Commits](https://github.com/quarkusio/quarkus-platform/compare/2.14.0.Final...2.14.1.Final) Updates `quarkus-maven-plugin` from 2.14.0.Final to 2.14.1.Final --- updated-dependencies: - dependency-name: io.quarkus:quarkus-universe-bom dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 291a93c..04b4a01 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ SPDX-License-Identifier: Apache-2.0 0.9.3 - 2.14.0.Final + 2.14.1.Final 3.0 2.0.3 4.10.1 From 4aea9c66f6e0ced9989f30a1218275552ae535d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Nov 2022 15:19:10 +0000 Subject: [PATCH 3/9] Bump slf4j-simple from 2.0.3 to 2.0.4 Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_2.0.3...v_2.0.4) --- updated-dependencies: - dependency-name: org.slf4j:slf4j-simple dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af1537a..8916a87 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ SPDX-License-Identifier: Apache-2.0 2.14.0.Final 3.0 - 2.0.3 + 2.0.4 5.0.0 1.5.3.Final 0.9.1 From 826a6bf4d72b9004f94b41be85d489321ba72024 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Mon, 21 Nov 2022 13:17:09 +0100 Subject: [PATCH 4/9] Replace SLF4J with Log4j2 to better fit Quarkus. Signed-off-by: Dennis Labordus --- app/pom.xml | 21 +++++++++++------ .../rest/CompasCimMappingConfiguration.java | 4 ++-- .../rest/v1/CompasCimMappingResource.java | 6 ++--- app/src/main/resources/application.properties | 6 +++-- pom.xml | 23 ++++++++++++++----- service/pom.xml | 20 ++++++++++------ .../cim/mapping/cgmes/CgmesCimReader.java | 6 ++--- .../cim/mapping/mapper/CimToSclMapper.java | 6 ++--- service/src/test/resources/log4j2.xml | 18 +++++++++++++++ 9 files changed, 77 insertions(+), 33 deletions(-) create mode 100644 service/src/test/resources/log4j2.xml diff --git a/app/pom.xml b/app/pom.xml index 133494c..62a0988 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -34,7 +34,7 @@ SPDX-License-Identifier: Apache-2.0 org.lfenergy.compas.core - jaxrs-commons + rest-commons @@ -47,27 +47,34 @@ SPDX-License-Identifier: Apache-2.0 io.quarkus - quarkus-smallrye-jwt + quarkus-resteasy-jaxb io.quarkus - quarkus-smallrye-openapi + quarkus-hibernate-validator + io.quarkus - quarkus-smallrye-health + quarkus-smallrye-jwt io.quarkus - quarkus-resteasy-jaxb + quarkus-smallrye-openapi io.quarkus - quarkus-container-image-docker + quarkus-smallrye-health + + + + org.jboss.logmanager + log4j2-jboss-logmanager + io.quarkus - quarkus-hibernate-validator + quarkus-container-image-docker diff --git a/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/CompasCimMappingConfiguration.java b/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/CompasCimMappingConfiguration.java index 268ee1c..ee91d30 100644 --- a/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/CompasCimMappingConfiguration.java +++ b/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/CompasCimMappingConfiguration.java @@ -13,8 +13,8 @@ */ @RegisterForReflection(targets = { com.powsybl.triplestore.impl.rdf4j.TripleStoreFactoryServiceRDF4J.class, - org.lfenergy.compas.core.jaxrs.model.ErrorResponse.class, - org.lfenergy.compas.core.jaxrs.model.ErrorMessage.class, + org.lfenergy.compas.core.commons.model.ErrorResponse.class, + org.lfenergy.compas.core.commons.model.ErrorMessage.class, javax.xml.namespace.QName.class }) public class CompasCimMappingConfiguration { diff --git a/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java b/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java index 0e3e08f..973cc72 100644 --- a/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java +++ b/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java @@ -4,13 +4,13 @@ package org.lfenergy.compas.cim.mapping.rest.v1; import io.quarkus.security.Authenticated; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.eclipse.microprofile.jwt.JsonWebToken; import org.lfenergy.compas.cim.mapping.rest.UserInfoProperties; import org.lfenergy.compas.cim.mapping.rest.v1.model.MapRequest; import org.lfenergy.compas.cim.mapping.rest.v1.model.MapResponse; import org.lfenergy.compas.cim.mapping.service.CompasCimMappingService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; @@ -25,7 +25,7 @@ @RequestScoped @Path("/cim/v1/") public class CompasCimMappingResource { - private static final Logger LOGGER = LoggerFactory.getLogger(CompasCimMappingResource.class); + private static final Logger LOGGER = LogManager.getLogger(CompasCimMappingResource.class); private CompasCimMappingService compasCimMappingService; diff --git a/app/src/main/resources/application.properties b/app/src/main/resources/application.properties index 22467aa..b9c8ce5 100644 --- a/app/src/main/resources/application.properties +++ b/app/src/main/resources/application.properties @@ -12,8 +12,8 @@ quarkus.log.level = INFO quarkus.log.category."org.lfenergy.compas.cim.mapping".level = INFO # Add scanning these dependencies for scanning, also used by native compilation. -quarkus.index-dependency.jaxrs-commons.group-id = org.lfenergy.compas.core -quarkus.index-dependency.jaxrs-commons.artifact-id = jaxrs-commons +quarkus.index-dependency.rest-commons.group-id = org.lfenergy.compas.core +quarkus.index-dependency.rest-commons.artifact-id = rest-commons quarkus.index-dependency.scl2007b4.group-id = org.lfenergy.compas.core quarkus.index-dependency.scl2007b4.artifact-id = scl2007b4 @@ -30,6 +30,8 @@ quarkus.native.additional-build-args=--initialize-at-run-time=org.eclipse.rdf4j. %dev.quarkus.http.cors = true %dev.quarkus.log.level = DEBUG +%dev.quarkus.log.category."com.powsybl".level = INFO +%dev.quarkus.log.category."org.eclipse.rdf4j".level = INFO %dev.quarkus.log.category."org.lfenergy.compas.cim.mapping".level = DEBUG # Smallrye JWT Properties (Microprofile) diff --git a/pom.xml b/pom.xml index 291a93c..b1d792c 100644 --- a/pom.xml +++ b/pom.xml @@ -23,12 +23,12 @@ SPDX-License-Identifier: Apache-2.0 3.0.0-M7 3.2.0 - 0.9.3 + local-SNAPSHOT 2.14.0.Final 3.0 - 2.0.3 4.10.1 + 2.19.0 1.5.3.Final 0.9.1 @@ -77,7 +77,7 @@ SPDX-License-Identifier: Apache-2.0 org.lfenergy.compas.core - jaxrs-commons + rest-commons ${compas.core.version} @@ -105,9 +105,20 @@ SPDX-License-Identifier: Apache-2.0 - org.slf4j - slf4j-simple - ${slf4j.version} + org.apache.logging.log4j + log4j-api + ${log4j2.version} + + + org.apache.logging.log4j + log4j-core + ${log4j2.version} + + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j2.version} diff --git a/service/pom.xml b/service/pom.xml index 61708ba..d8c5ffa 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -52,8 +52,19 @@ SPDX-License-Identifier: Apache-2.0 - org.slf4j - slf4j-api + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-core + provided + + + + org.apache.logging.log4j + log4j-slf4j-impl + provided @@ -67,11 +78,6 @@ SPDX-License-Identifier: Apache-2.0 junit-jupiter-engine test - - org.slf4j - slf4j-simple - test - com.openpojo openpojo diff --git a/service/src/main/java/org/lfenergy/compas/cim/mapping/cgmes/CgmesCimReader.java b/service/src/main/java/org/lfenergy/compas/cim/mapping/cgmes/CgmesCimReader.java index 3f9ecec..2299ffa 100644 --- a/service/src/main/java/org/lfenergy/compas/cim/mapping/cgmes/CgmesCimReader.java +++ b/service/src/main/java/org/lfenergy/compas/cim/mapping/cgmes/CgmesCimReader.java @@ -8,10 +8,10 @@ import com.powsybl.commons.datasource.ReadOnlyMemDataSource; import com.powsybl.triplestore.api.TripleStoreFactory; import org.apache.commons.io.input.ReaderInputStream; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.lfenergy.compas.cim.mapping.exception.CompasCimMappingException; import org.lfenergy.compas.cim.mapping.model.CimData; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import javax.enterprise.context.ApplicationScoped; import java.io.InputStream; @@ -28,7 +28,7 @@ */ @ApplicationScoped public class CgmesCimReader { - private static final Logger LOGGER = LoggerFactory.getLogger(CgmesCimReader.class); + private static final Logger LOGGER = LogManager.getLogger(CgmesCimReader.class); /** * Use PowSyBl to convert a CIM XML InputStream to the PowSyBl Cgmes Model. diff --git a/service/src/main/java/org/lfenergy/compas/cim/mapping/mapper/CimToSclMapper.java b/service/src/main/java/org/lfenergy/compas/cim/mapping/mapper/CimToSclMapper.java index 8c6401f..3274a10 100644 --- a/service/src/main/java/org/lfenergy/compas/cim/mapping/mapper/CimToSclMapper.java +++ b/service/src/main/java/org/lfenergy/compas/cim/mapping/mapper/CimToSclMapper.java @@ -3,12 +3,12 @@ // SPDX-License-Identifier: Apache-2.0 package org.lfenergy.compas.cim.mapping.mapper; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.lfenergy.compas.cim.mapping.model.*; import org.lfenergy.compas.scl2007b4.model.*; import org.mapstruct.*; import org.mapstruct.factory.Mappers; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.math.BigDecimal; @@ -25,7 +25,7 @@ public abstract class CimToSclMapper { public static final CimToSclMapper INSTANCE = Mappers.getMapper(CimToSclMapper.class); - private static final Logger LOGGER = LoggerFactory.getLogger(CimToSclMapper.class); + private static final Logger LOGGER = LogManager.getLogger(CimToSclMapper.class); /** * Top level mapping method to start the mapping of all known elements from Cgmes Model diff --git a/service/src/test/resources/log4j2.xml b/service/src/test/resources/log4j2.xml new file mode 100644 index 0000000..eda07e8 --- /dev/null +++ b/service/src/test/resources/log4j2.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file From ae504d792064d38e8e1379467dcedb1845bb2eb0 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Mon, 21 Nov 2022 13:20:29 +0100 Subject: [PATCH 5/9] Fixed re-use issue Signed-off-by: Dennis Labordus --- service/src/test/resources/log4j2.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/service/src/test/resources/log4j2.xml b/service/src/test/resources/log4j2.xml index eda07e8..49c92ab 100644 --- a/service/src/test/resources/log4j2.xml +++ b/service/src/test/resources/log4j2.xml @@ -1,4 +1,9 @@ + @@ -15,4 +20,5 @@ - \ No newline at end of file + + \ No newline at end of file From aaea14b58a93c7cf044ce77df3f0ada39a431b44 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Mon, 21 Nov 2022 15:58:18 +0100 Subject: [PATCH 6/9] Use released version of CoMPAS Core Signed-off-by: Dennis Labordus --- pom.xml | 2 +- service/src/test/resources/log4j2.xml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b1d792c..336d314 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ SPDX-License-Identifier: Apache-2.0 3.0.0-M7 3.2.0 - local-SNAPSHOT + 0.11.0 2.14.0.Final 3.0 diff --git a/service/src/test/resources/log4j2.xml b/service/src/test/resources/log4j2.xml index 49c92ab..24cf918 100644 --- a/service/src/test/resources/log4j2.xml +++ b/service/src/test/resources/log4j2.xml @@ -20,5 +20,4 @@ SPDX-License-Identifier: Apache-2.0 - - \ No newline at end of file + From 2ab5d390e955943bb865d1aa7b464b50ffdff5c2 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Tue, 22 Nov 2022 09:32:00 +0100 Subject: [PATCH 7/9] Added logging on endpoints. Signed-off-by: Dennis Labordus --- .../compas/cim/mapping/rest/v1/CompasCimMappingResource.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java b/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java index 973cc72..c6cc4ed 100644 --- a/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java +++ b/app/src/main/java/org/lfenergy/compas/cim/mapping/rest/v1/CompasCimMappingResource.java @@ -45,6 +45,7 @@ public CompasCimMappingResource(CompasCimMappingService compasCimMappingService) @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) public MapResponse map(@Valid MapRequest request) { + LOGGER.info("Converting CIM File to SCL File"); String who = jsonWebToken.getClaim(userInfoProperties.who()); LOGGER.trace("Username used for Who {}", who); From 9de3037a1cac19fbd57a044deb01949075b6c412 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 09:25:37 +0000 Subject: [PATCH 8/9] Bump microprofile-openapi-api from 3.0 to 3.1 Bumps [microprofile-openapi-api](https://github.com/eclipse/microprofile-open-api) from 3.0 to 3.1. - [Release notes](https://github.com/eclipse/microprofile-open-api/releases) - [Commits](https://github.com/eclipse/microprofile-open-api/compare/3.0...3.1) --- updated-dependencies: - dependency-name: org.eclipse.microprofile.openapi:microprofile-openapi-api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 821f060..01db9ce 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ SPDX-License-Identifier: Apache-2.0 0.11.0 2.14.1.Final - 3.0 + 3.1 5.0.0 2.19.0 1.5.3.Final From 36439b8feb54bf78bf84811cb7358c03812e37bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Nov 2022 15:13:36 +0000 Subject: [PATCH 9/9] Bump ubi8/ubi-minimal from 8.7 to 8.7-923 in /app/src/main/docker Bumps ubi8/ubi-minimal from 8.7 to 8.7-923. --- updated-dependencies: - dependency-name: ubi8/ubi-minimal dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- app/src/main/docker/Dockerfile.jvm | 2 +- app/src/main/docker/Dockerfile.native | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/docker/Dockerfile.jvm b/app/src/main/docker/Dockerfile.jvm index ab847d9..ee8b2bf 100644 --- a/app/src/main/docker/Dockerfile.jvm +++ b/app/src/main/docker/Dockerfile.jvm @@ -21,7 +21,7 @@ # docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/app-jvm # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7-923 ARG JAVA_PACKAGE=java-17-openjdk-headless ARG RUN_JAVA_VERSION=1.3.8 diff --git a/app/src/main/docker/Dockerfile.native b/app/src/main/docker/Dockerfile.native index 414d9f7..95c9f04 100644 --- a/app/src/main/docker/Dockerfile.native +++ b/app/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/app # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7-923 WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \