Skip to content

Commit 0611f9b

Browse files
Merge pull request #424 from boozallen/351-metadata-java-17
#351 Update metadata to be compatible with Java 17
2 parents 85aeb8f + 17536c3 commit 0611f9b

File tree

8 files changed

+83
-85
lines changed

8 files changed

+83
-85
lines changed

DRAFT_RELEASE_NOTES.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ the `jackson-mapper-asl` dependency artifact in the root pom.xml file to enable
8585

8686
## Conditional Steps
8787

88-
### Data Access Dependency Update
89-
Data Access no longer needs to explicitly set the `kafka-clients` dependency. It can be removed along with its
90-
exclusion from the `quarkus-smallrye-reactive-messaging-kafka` dependency.
88+
### Kafka Clients Dependency Update
89+
Data Access and the Java testing module (`<YOUR_PROJECT>-tests/<YOUR_PROJECT>-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.
9190

9291
### For projects that have customized the Spark Operator Service Account permissions
9392
The service account for the pipeline invocation service is now separated from spark operator and configured solely for the service.

build-parent/pom.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777
<version.jakarta.activation.api>2.1.2</version.jakarta.activation.api>
7878
<version.javax.servlet>3.1.0</version.javax.servlet>
7979

80-
<!-- Spark Default Dependencies. See `spark-*` profiles below for alternative sets -->
80+
<!-- Spark Default Dependencies. See `spark-*` profiles below for alternative sets -->
8181
<version.spark>3.5.2</version.spark>
82-
<version.scala>2.12.13</version.scala>
82+
<version.scala>2.12.20</version.scala>
8383
<version.scala.minor>2.12</version.scala.minor>
8484
<version.delta>3.2.1</version.delta>
8585
<version.elasticsearch>8.9.0</version.elasticsearch>
@@ -867,9 +867,14 @@
867867
<TESTCONTAINERS_RYUK_DISABLED>${TESTCONTAINERS_RYUK_DISABLED}</TESTCONTAINERS_RYUK_DISABLED>
868868
<!--<TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>YOUR MIRROR OR INTENRAL REPO GOES HERE - e.g., nexus.foobar.com/</TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX>-->
869869
</environmentVariables>
870-
<!-- Spark needs to use an internal API that has been made inaccessible by default. This
871-
exposes it -->
872-
<argLine>--add-exports java.base/sun.nio.ch=ALL-UNNAMED</argLine>
870+
<!-- Spark needs to use an internal API that has been made inaccessible by default, this is resolved by add-exports.
871+
Apache Hive currently does not support java 17, so the add-opens workaround is used to allow the illegal reflection
872+
call until Hive updates their compatible Java versions.
873+
https://stackoverflow.com/questions/41265266/how-to-solve-inaccessibleobjectexception-unable-to-make-member-accessible-m?rq=2-->
874+
<argLine>
875+
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
876+
--add-opens java.base/java.net=ALL-UNNAMED
877+
</argLine>
873878
</configuration>
874879
</plugin>
875880
<plugin>

extensions/extensions-docker/aissemble-metadata/src/main/resources/docker/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ COPY --chown=default target/quarkus-app/lib/ $JAVA_APP_DIR/lib/
66
COPY --chown=default target/quarkus-app/*.jar $JAVA_APP_DIR/
77
COPY --chown=default target/quarkus-app/app/ $JAVA_APP_DIR/app/
88
COPY --chown=default target/quarkus-app/quarkus/ $JAVA_APP_DIR/quarkus/
9+
10+
# Spark needs to use an internal API that has been made inaccessible by default, this is resolved by add-exports.
11+
# Apache Hive currently does not support java 17, so the add-opens workaround is used to allow the illegal reflection
12+
# call until Hive updates their compatible Java versions.
13+
# https://stackoverflow.com/questions/41265266/how-to-solve-inaccessibleobjectexception-unable-to-make-member-accessible-m?rq=2
14+
ENV JAVA_OPTS_APPEND="${JAVA_OPTS_APPEND} --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED"

extensions/extensions-docker/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<module>aissemble-fastapi</module>
3838
<module>aissemble-hive-service</module>
3939
<module>aissemble-jenkins</module>
40-
<!--<module>aissemble-metadata</module>-->
40+
<module>aissemble-metadata</module>
4141
<module>aissemble-nvidia</module>
4242
<module>aissemble-policy-decision-point</module>
4343
<module>aissemble-spark</module>

extensions/extensions-metadata-service/pom.xml

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@
112112
<artifactId>extensions-data-delivery-spark</artifactId>
113113
<version>${project.version}</version>
114114
</dependency>
115-
<dependency>
116-
<groupId>org.apache.spark</groupId>
117-
<artifactId>spark-hive_2.12</artifactId>
118-
<version>${version.spark}</version>
119-
</dependency>
115+
120116
<!-- Downgrade Scala 2.13 (from Quarkus) to Scala 2.12 -->
121117
<dependency>
122118
<groupId>org.scala-lang</groupId>
@@ -141,44 +137,61 @@
141137
<version>${version.javax.servlet}</version>
142138
</dependency>
143139
<dependency>
144-
<groupId>mysql</groupId>
145-
<artifactId>mysql-connector-java</artifactId>
146-
<version>${version.mysql-connector}</version>
140+
<groupId>io.smallrye.reactive</groupId>
141+
<artifactId>smallrye-reactive-messaging-api</artifactId>
142+
<version>${version.smallrye.reactive.messaging}</version>
147143
</dependency>
148144
<dependency>
149-
<groupId>io.quarkus</groupId>
150-
<artifactId>quarkus-smallrye-reactive-messaging</artifactId>
145+
<groupId>org.eclipse.microprofile.metrics</groupId>
146+
<artifactId>microprofile-metrics-api</artifactId>
147+
<version>5.1.1</version>
151148
</dependency>
152149
<dependency>
153-
<groupId>io.quarkus</groupId>
154-
<artifactId>quarkus-kafka-client</artifactId>
150+
<groupId>com.fasterxml.jackson.datatype</groupId>
151+
<artifactId>jackson-datatype-jsr310</artifactId>
152+
<version>${version.jackson}</version>
155153
</dependency>
156154
<dependency>
157-
<groupId>io.quarkus</groupId>
158-
<artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId>
155+
<groupId>com.fasterxml.jackson.datatype</groupId>
156+
<artifactId>jackson-datatype-jdk8</artifactId>
157+
<version>${version.jackson}</version>
159158
</dependency>
160159
<dependency>
161-
<groupId>io.quarkus</groupId>
162-
<artifactId>quarkus-resteasy</artifactId>
160+
<groupId>com.fasterxml.jackson.module</groupId>
161+
<artifactId>jackson-module-parameter-names</artifactId>
162+
<version>${version.jackson}</version>
163+
</dependency>
164+
<dependency>
165+
<groupId>jakarta.enterprise</groupId>
166+
<artifactId>jakarta.enterprise.cdi-api</artifactId>
167+
<version>${version.jakarta.cdi}</version>
163168
</dependency>
169+
<dependency>
170+
<groupId>jakarta.inject</groupId>
171+
<artifactId>jakarta.inject-api</artifactId>
172+
<version>${version.jakarta.inject}</version>
173+
</dependency>
174+
<dependency>
175+
<groupId>jakarta.ws.rs</groupId>
176+
<artifactId>jakarta.ws.rs-api</artifactId>
177+
<version>${version.jakarta.wr.rs}</version>
178+
</dependency>
179+
180+
<!-- Quarkus Dependencies -->
164181
<dependency>
165182
<groupId>io.quarkus</groupId>
166-
<artifactId>quarkus-smallrye-openapi</artifactId>
167-
<exclusions>
168-
<exclusion>
169-
<groupId>org.jboss.slf4j</groupId>
170-
<artifactId>slf4j-jboss-logmanager</artifactId>
171-
</exclusion>
172-
</exclusions>
183+
<artifactId>quarkus-kafka-client</artifactId>
173184
</dependency>
174185
<dependency>
175186
<groupId>io.quarkus</groupId>
176187
<artifactId>quarkus-resteasy-jackson</artifactId>
177188
</dependency>
178189
<dependency>
179-
<groupId>xalan</groupId>
180-
<artifactId>xalan</artifactId>
190+
<groupId>io.quarkus</groupId>
191+
<artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId>
181192
</dependency>
193+
194+
<!-- Testing Dependencies -->
182195
<dependency>
183196
<groupId>junit</groupId>
184197
<artifactId>junit</artifactId>
@@ -187,7 +200,6 @@
187200
<groupId>io.cucumber</groupId>
188201
<artifactId>cucumber-junit</artifactId>
189202
</dependency>
190-
191203
<dependency>
192204
<groupId>io.cucumber</groupId>
193205
<artifactId>cucumber-java</artifactId>
@@ -197,12 +209,6 @@
197209
<artifactId>smallrye-reactive-messaging-in-memory</artifactId>
198210
<scope>test</scope>
199211
</dependency>
200-
<dependency>
201-
<groupId>net.masterthought</groupId>
202-
<artifactId>cucumber-reporting</artifactId>
203-
<version>${version.cucumber.reporting.plugin}</version>
204-
<scope>test</scope>
205-
</dependency>
206212
</dependencies>
207213

208214
</project>

extensions/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<module>extensions-docker</module>
2929
<module>extensions-alerting</module>
3030
<module>extensions-messaging</module>
31-
<!--<module>extensions-metadata-service</module>-->
31+
<module>extensions-metadata-service</module>
3232
<module>extensions-helm</module>
3333
<module>extensions-pipeline-invocation-service</module>
3434
</modules>

foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@
120120
<version>${version.resteasy}</version>
121121
<scope>compile</scope>
122122
</dependency>
123-
<dependency>
124-
<groupId>org.apache.kafka</groupId>
125-
<artifactId>kafka-clients</artifactId>
126-
<version>2.7.2</version>
127-
<scope>compile</scope>
128-
</dependency>
129123
<dependency>
130124
<groupId>org.awaitility</groupId>
131125
<artifactId>awaitility</artifactId>

foundation/foundation-metadata/foundation-metadata-producer/pom.xml

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,65 +11,53 @@
1111
<artifactId>foundation-metadata-producer</artifactId>
1212
<name>aiSSEMBLE::Foundation::Metadata::Producer</name>
1313

14-
<dependencyManagement>
15-
<dependencies>
16-
<dependency>
17-
<groupId>com.boozallen.aissemble</groupId>
18-
<artifactId>bom-component</artifactId>
19-
<version>${project.version}</version>
20-
<type>pom</type>
21-
<scope>import</scope>
22-
</dependency>
23-
<dependency>
24-
<groupId>com.boozallen.aissemble</groupId>
25-
<artifactId>aissemble-quarkus-bom</artifactId>
26-
<version>${project.version}</version>
27-
<type>pom</type>
28-
<scope>import</scope>
29-
</dependency>
30-
<dependency>
31-
<groupId>io.smallrye.reactive</groupId>
32-
<artifactId>smallrye-reactive-messaging-api</artifactId>
33-
<version>${version.smallrye.reactive.messaging}</version>
34-
</dependency>
35-
</dependencies>
36-
</dependencyManagement>
37-
3814
<dependencies>
3915
<dependency>
4016
<groupId>${project.groupId}</groupId>
4117
<artifactId>foundation-metadata-core</artifactId>
4218
<version>${project.version}</version>
4319
</dependency>
4420

45-
<!-- Logging Dependencies (from build-parent pom) -->
4621
<dependency>
47-
<groupId>org.apache.logging.log4j</groupId>
48-
<artifactId>log4j-slf4j2-impl</artifactId>
22+
<groupId>com.fasterxml.jackson.core</groupId>
23+
<artifactId>jackson-databind</artifactId>
24+
<version>${version.jackson}</version>
4925
</dependency>
5026
<dependency>
51-
<groupId>org.apache.logging.log4j</groupId>
52-
<artifactId>log4j-core</artifactId>
27+
<groupId>com.fasterxml.jackson.datatype</groupId>
28+
<artifactId>jackson-datatype-jsr310</artifactId>
29+
<version>${version.jackson}</version>
5330
</dependency>
54-
5531
<dependency>
56-
<groupId>org.apache.commons</groupId>
57-
<artifactId>commons-collections4</artifactId>
32+
<groupId>com.fasterxml.jackson.datatype</groupId>
33+
<artifactId>jackson-datatype-jdk8</artifactId>
34+
<version>${version.jackson}</version>
5835
</dependency>
5936
<dependency>
60-
<groupId>io.quarkus</groupId>
61-
<artifactId>quarkus-kafka-client</artifactId>
37+
<groupId>com.fasterxml.jackson.module</groupId>
38+
<artifactId>jackson-module-parameter-names</artifactId>
39+
<version>${version.jackson}</version>
6240
</dependency>
6341
<dependency>
64-
<groupId>com.boozallen.aissemble</groupId>
65-
<artifactId>foundation-messaging-java</artifactId>
66-
<version>${project.version}</version>
42+
<groupId>org.apache.kafka</groupId>
43+
<artifactId>kafka-clients</artifactId>
44+
<version>3.8.0</version>
6745
</dependency>
6846
<dependency>
6947
<groupId>io.smallrye.reactive</groupId>
7048
<artifactId>smallrye-reactive-messaging-api</artifactId>
7149
<version>${version.smallrye.reactive.messaging}</version>
7250
</dependency>
51+
<dependency>
52+
<groupId>jakarta.enterprise</groupId>
53+
<artifactId>jakarta.enterprise.cdi-api</artifactId>
54+
<version>${version.jakarta.cdi}</version>
55+
</dependency>
56+
<dependency>
57+
<groupId>jakarta.inject</groupId>
58+
<artifactId>jakarta.inject-api</artifactId>
59+
<version>${version.jakarta.inject}</version>
60+
</dependency>
7361
</dependencies>
7462

7563
<build>

0 commit comments

Comments
 (0)