Skip to content

Commit 0041ea6

Browse files
authored
CAMEL-18608: camel-spark - Fix compatibility issues with JDK 17 (#8543)
## Motivation The spark test fails with JDK 17 on Jenkins and should be fixed. ## Modifications * Add the missing `--add-opens` * Upgrade to the latest maintenance version of scala `2.12` to have the fix for scala/bug#12419 which makes the test fails
1 parent c6c9fb2 commit 0041ea6

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

components/camel-spark/pom.xml

+20-3
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@
4747
<dependency>
4848
<groupId>org.scala-lang</groupId>
4949
<artifactId>scala-library</artifactId>
50-
<version>2.12.14</version>
50+
<version>2.12.17</version>
5151
</dependency>
5252
<dependency>
5353
<groupId>org.scala-lang</groupId>
5454
<artifactId>scala-reflect</artifactId>
55-
<version>2.12.14</version>
55+
<version>2.12.17</version>
5656
</dependency>
5757

5858
<!-- guava -->
@@ -299,5 +299,22 @@
299299
</dependency>
300300

301301
</dependencies>
302-
302+
<profiles>
303+
<profile>
304+
<id>jdk17-build</id>
305+
<activation>
306+
<jdk>[17,)</jdk>
307+
</activation>
308+
<build>
309+
<plugins>
310+
<plugin>
311+
<artifactId>maven-surefire-plugin</artifactId>
312+
<configuration>
313+
<argLine>--add-opens java.base/sun.nio.ch=ALL-UNNAMED</argLine>
314+
</configuration>
315+
</plugin>
316+
</plugins>
317+
</build>
318+
</profile>
319+
</profiles>
303320
</project>

0 commit comments

Comments
 (0)