From 17536c36424dc0908cfddb68d0dc67b488e0d6ee Mon Sep 17 00:00:00 2001 From: Carter Cundiff Date: Fri, 18 Oct 2024 11:38:48 -0400 Subject: [PATCH] #351 Update metadata to be compatible with Java 17 --- DRAFT_RELEASE_NOTES.md | 5 +- build-parent/pom.xml | 15 ++-- .../src/main/resources/docker/Dockerfile | 6 ++ extensions/extensions-docker/pom.xml | 2 +- .../extensions-metadata-service/pom.xml | 70 ++++++++++--------- extensions/pom.xml | 2 +- .../__rootArtifactId__-tests-java/pom.xml | 6 -- .../foundation-metadata-producer/pom.xml | 62 +++++++--------- 8 files changed, 83 insertions(+), 85 deletions(-) diff --git a/DRAFT_RELEASE_NOTES.md b/DRAFT_RELEASE_NOTES.md index 3e6179040..7ba94256a 100644 --- a/DRAFT_RELEASE_NOTES.md +++ b/DRAFT_RELEASE_NOTES.md @@ -85,9 +85,8 @@ the `jackson-mapper-asl` dependency artifact in the root pom.xml file to enable ## Conditional Steps -### Data Access Dependency Update -Data Access no longer needs to explicitly set the `kafka-clients` dependency. It can be removed along with its -exclusion from the `quarkus-smallrye-reactive-messaging-kafka` dependency. +### Kafka Clients Dependency Update +Data Access and the Java testing module (`-tests/-tests-java/pom.xml`) no longer need to explicitly set the `kafka-clients` dependency. It can be removed along with its exclusion from the `quarkus-smallrye-reactive-messaging-kafka` dependency. ### For projects that have customized the Spark Operator Service Account permissions The service account for the pipeline invocation service is now separated from spark operator and configured solely for the service. diff --git a/build-parent/pom.xml b/build-parent/pom.xml index 4a73a8df7..31da65155 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -77,9 +77,9 @@ 2.1.2 3.1.0 - + 3.5.2 - 2.12.13 + 2.12.20 2.12 3.2.1 8.9.0 @@ -867,9 +867,14 @@ ${TESTCONTAINERS_RYUK_DISABLED} - - --add-exports java.base/sun.nio.ch=ALL-UNNAMED + + + --add-exports java.base/sun.nio.ch=ALL-UNNAMED + --add-opens java.base/java.net=ALL-UNNAMED + diff --git a/extensions/extensions-docker/aissemble-metadata/src/main/resources/docker/Dockerfile b/extensions/extensions-docker/aissemble-metadata/src/main/resources/docker/Dockerfile index 6835d79bc..b87bf5407 100644 --- a/extensions/extensions-docker/aissemble-metadata/src/main/resources/docker/Dockerfile +++ b/extensions/extensions-docker/aissemble-metadata/src/main/resources/docker/Dockerfile @@ -6,3 +6,9 @@ COPY --chown=default target/quarkus-app/lib/ $JAVA_APP_DIR/lib/ COPY --chown=default target/quarkus-app/*.jar $JAVA_APP_DIR/ COPY --chown=default target/quarkus-app/app/ $JAVA_APP_DIR/app/ COPY --chown=default target/quarkus-app/quarkus/ $JAVA_APP_DIR/quarkus/ + +# Spark needs to use an internal API that has been made inaccessible by default, this is resolved by add-exports. +# Apache Hive currently does not support java 17, so the add-opens workaround is used to allow the illegal reflection +# call until Hive updates their compatible Java versions. +# https://stackoverflow.com/questions/41265266/how-to-solve-inaccessibleobjectexception-unable-to-make-member-accessible-m?rq=2 +ENV JAVA_OPTS_APPEND="${JAVA_OPTS_APPEND} --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED" \ No newline at end of file diff --git a/extensions/extensions-docker/pom.xml b/extensions/extensions-docker/pom.xml index c6b94f6ac..988353e10 100644 --- a/extensions/extensions-docker/pom.xml +++ b/extensions/extensions-docker/pom.xml @@ -37,7 +37,7 @@ aissemble-fastapi aissemble-hive-service aissemble-jenkins - + aissemble-metadata aissemble-nvidia aissemble-policy-decision-point aissemble-spark diff --git a/extensions/extensions-metadata-service/pom.xml b/extensions/extensions-metadata-service/pom.xml index 26e8c2a79..0d8e7c12d 100644 --- a/extensions/extensions-metadata-service/pom.xml +++ b/extensions/extensions-metadata-service/pom.xml @@ -112,11 +112,7 @@ extensions-data-delivery-spark ${project.version} - - org.apache.spark - spark-hive_2.12 - ${version.spark} - + org.scala-lang @@ -141,44 +137,61 @@ ${version.javax.servlet} - mysql - mysql-connector-java - ${version.mysql-connector} + io.smallrye.reactive + smallrye-reactive-messaging-api + ${version.smallrye.reactive.messaging} - io.quarkus - quarkus-smallrye-reactive-messaging + org.eclipse.microprofile.metrics + microprofile-metrics-api + 5.1.1 - io.quarkus - quarkus-kafka-client + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${version.jackson} - io.quarkus - quarkus-smallrye-reactive-messaging-kafka + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + ${version.jackson} - io.quarkus - quarkus-resteasy + com.fasterxml.jackson.module + jackson-module-parameter-names + ${version.jackson} + + + jakarta.enterprise + jakarta.enterprise.cdi-api + ${version.jakarta.cdi} + + jakarta.inject + jakarta.inject-api + ${version.jakarta.inject} + + + jakarta.ws.rs + jakarta.ws.rs-api + ${version.jakarta.wr.rs} + + + io.quarkus - quarkus-smallrye-openapi - - - org.jboss.slf4j - slf4j-jboss-logmanager - - + quarkus-kafka-client io.quarkus quarkus-resteasy-jackson - xalan - xalan + io.quarkus + quarkus-smallrye-reactive-messaging-kafka + + junit junit @@ -187,7 +200,6 @@ io.cucumber cucumber-junit - io.cucumber cucumber-java @@ -197,12 +209,6 @@ smallrye-reactive-messaging-in-memory test - - net.masterthought - cucumber-reporting - ${version.cucumber.reporting.plugin} - test - diff --git a/extensions/pom.xml b/extensions/pom.xml index 10037181d..d99630e9a 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -28,7 +28,7 @@ extensions-docker extensions-alerting extensions-messaging - + extensions-metadata-service extensions-helm extensions-pipeline-invocation-service diff --git a/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml b/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml index 6bf1777a4..3b84974e3 100644 --- a/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml +++ b/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml @@ -120,12 +120,6 @@ ${version.resteasy} compile - - org.apache.kafka - kafka-clients - 2.7.2 - compile - org.awaitility awaitility diff --git a/foundation/foundation-metadata/foundation-metadata-producer/pom.xml b/foundation/foundation-metadata/foundation-metadata-producer/pom.xml index 8b9c9b34b..631df09d5 100644 --- a/foundation/foundation-metadata/foundation-metadata-producer/pom.xml +++ b/foundation/foundation-metadata/foundation-metadata-producer/pom.xml @@ -11,30 +11,6 @@ foundation-metadata-producer aiSSEMBLE::Foundation::Metadata::Producer - - - - com.boozallen.aissemble - bom-component - ${project.version} - pom - import - - - com.boozallen.aissemble - aissemble-quarkus-bom - ${project.version} - pom - import - - - io.smallrye.reactive - smallrye-reactive-messaging-api - ${version.smallrye.reactive.messaging} - - - - ${project.groupId} @@ -42,34 +18,46 @@ ${project.version} - - org.apache.logging.log4j - log4j-slf4j2-impl + com.fasterxml.jackson.core + jackson-databind + ${version.jackson} - org.apache.logging.log4j - log4j-core + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${version.jackson} - - org.apache.commons - commons-collections4 + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + ${version.jackson} - io.quarkus - quarkus-kafka-client + com.fasterxml.jackson.module + jackson-module-parameter-names + ${version.jackson} - com.boozallen.aissemble - foundation-messaging-java - ${project.version} + org.apache.kafka + kafka-clients + 3.8.0 io.smallrye.reactive smallrye-reactive-messaging-api ${version.smallrye.reactive.messaging} + + jakarta.enterprise + jakarta.enterprise.cdi-api + ${version.jakarta.cdi} + + + jakarta.inject + jakarta.inject-api + ${version.jakarta.inject} +