Skip to content

Commit d6340ba

Browse files
Rishi-webRushil
andauthored
Fix : module java.base does not opens java.lang to unnamed module (#33)
* Fix : module java.base does not opens java.lang to unnamed module Signed-off-by: Rushil <rushil.v@ibm.com> * Adding profile config for java-9+ Signed-off-by: Rushil <rushil.v@ibm.com> Signed-off-by: Rushil <rushil.v@ibm.com> Co-authored-by: Rushil <rushil.v@ibm.com>
1 parent 20e93bd commit d6340ba

2 files changed

Lines changed: 26 additions & 8 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dist: bionic
44
jdk:
55
- openjdk8
66
- openjdk11
7-
- openjdk14
7+
- openjdk17
88

99
env:
1010
global:

pom.xml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
32
<modelVersion>4.0.0</modelVersion>
43

54
<groupId>com.ibm.cloud</groupId>
@@ -70,8 +69,10 @@
7069
<maven-checkstyle-plugin-version>3.1.0</maven-checkstyle-plugin-version>
7170
<maven-failsafe-plugin-version>3.0.0-M4</maven-failsafe-plugin-version>
7271
<maven-buildnumber-plugin-version>1.4</maven-buildnumber-plugin-version>
73-
<powermock-version>2.0.5</powermock-version>
74-
<mockito-version>3.2.4</mockito-version>
72+
<powermock-version>2.0.9</powermock-version>
73+
<mockito-version>3.12.4</mockito-version>
74+
<!-- This property should be empty by default. -->
75+
<surefireJvmArgs></surefireJvmArgs>
7576
</properties>
7677

7778
<dependencies>
@@ -357,13 +358,14 @@
357358
<groupId>org.codehaus.mojo</groupId>
358359
<artifactId>buildnumber-maven-plugin</artifactId>
359360
</plugin>
360-
361361
<plugin>
362362
<groupId>org.apache.maven.plugins</groupId>
363363
<artifactId>maven-surefire-plugin</artifactId>
364-
<version>2.22.2</version>
364+
<version>3.0.0-M5</version>
365+
<configuration>
366+
<argLine>${surefireJvmArgs}</argLine>
367+
</configuration>
365368
</plugin>
366-
367369
</plugins>
368370
</build>
369371

@@ -389,6 +391,22 @@
389391
</plugins>
390392
</build>
391393
</profile>
394+
<profile>
395+
<id>java8</id>
396+
<activation>
397+
<jdk>1.8</jdk>
398+
</activation>
399+
</profile>
400+
<profile>
401+
<id>java9plus</id>
402+
<activation>
403+
<jdk>[9,)</jdk>
404+
</activation>
405+
<properties>
406+
<!-- For java 9 and higher, we need these jvm args when running tests due to errors caused by other libraries. -->
407+
<surefireJvmArgs>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.logging/java.util.logging=ALL-UNNAMED</surefireJvmArgs>
408+
</properties>
409+
</profile>
392410
</profiles>
393411

394412
</project>

0 commit comments

Comments
 (0)