Skip to content

Commit c5078b6

Browse files
authored
[JAVA-44217] Review add-opens and add-exports in modules (#18287)
1 parent f71e501 commit c5078b6

File tree

14 files changed

+15
-65
lines changed

14 files changed

+15
-65
lines changed

core-java-modules/core-java-collections-array-list/pom.xml

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
<plugin>
3434
<groupId>org.apache.maven.plugins</groupId>
3535
<artifactId>maven-compiler-plugin</artifactId>
36-
<configuration>
37-
<source>${maven-compiler-plugin.source}</source>
38-
<target>${maven-compiler-plugin.target}</target>
39-
</configuration>
36+
<version>${maven-compiler-plugin.version}</version>
4037
</plugin>
4138
<plugin>
4239
<groupId>org.apache.maven.plugins</groupId>
@@ -51,9 +48,4 @@
5148
</plugins>
5249
</build>
5350

54-
<properties>
55-
<maven-compiler-plugin.source>21</maven-compiler-plugin.source>
56-
<maven-compiler-plugin.target>21</maven-compiler-plugin.target>
57-
</properties>
58-
5951
</project>

core-java-modules/core-java-nio-2/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
<groupId>org.apache.maven.plugins</groupId>
2020
<artifactId>maven-surefire-plugin</artifactId>
2121
<version>${maven-surefire-plugin.version}</version>
22-
<configuration>
23-
<argLine>
24-
--add-opens java.base/java.nio=ALL-UNNAMED
25-
</argLine>
26-
</configuration>
2722
</plugin>
2823
</plugins>
2924
</build>

core-java-modules/core-java-nio-3/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
<groupId>org.apache.maven.plugins</groupId>
2020
<artifactId>maven-surefire-plugin</artifactId>
2121
<version>${maven-surefire-plugin.version}</version>
22-
<configuration>
23-
<argLine>
24-
--add-opens java.base/java.nio=ALL-UNNAMED
25-
</argLine>
26-
</configuration>
2722
</plugin>
2823
</plugins>
2924
</build>

di-modules/cdi/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@
4848
<groupId>org.apache.maven.plugins</groupId>
4949
<artifactId>maven-surefire-plugin</artifactId>
5050
<version>${maven-surefire-plugin.version}</version>
51-
<configuration>
52-
<argLine>
53-
--add-opens java.base/java.lang=ALL-UNNAMED
54-
</argLine>
55-
</configuration>
5651
</plugin>
5752
</plugins>
5853
</build>

libraries-data-2/pom.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
<dependency>
126126
<groupId>com.thoughtworks.xstream</groupId>
127127
<artifactId>xstream</artifactId>
128-
<version>1.4.16</version>
128+
<version>${xstream.version}</version>
129129
</dependency>
130130
</dependencies>
131131

@@ -137,8 +137,6 @@
137137
<version>${maven-surefire-plugin.version}</version>
138138
<configuration>
139139
<argLine>
140-
--add-opens java.base/java.util=ALL-UNNAMED
141-
--add-opens java.base/java.nio=ALL-UNNAMED
142140
--add-opens java.base/java.lang=ALL-UNNAMED
143141
</argLine>
144142
</configuration>
@@ -161,6 +159,7 @@
161159
<ignite.version>2.16.0</ignite.version>
162160
<gson.version>2.11.0</gson.version>
163161
<jmapper.version>1.6.0.1</jmapper.version>
162+
<xstream.version>1.4.16</xstream.version>
164163
</properties>
165164

166165
</project>

libraries-data/pom.xml

+1-5
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@
173173
<version>${maven-surefire-plugin.version}</version>
174174
<configuration>
175175
<argLine>
176-
--add-opens java.base/java.nio=ALL-UNNAMED
177-
--add-opens java.base/java.lang=ALL-UNNAMED
178176
--add-opens java.base/java.util=ALL-UNNAMED
179177
</argLine>
180178
</configuration>
@@ -183,13 +181,11 @@
183181
</build>
184182

185183
<properties>
186-
<maven.compiler.source>17</maven.compiler.source>
187-
<maven.compiler.target>17</maven.compiler.target>
188184
<httpclient.version>3.1</httpclient.version>
189185
<kafka.version>3.3.1</kafka.version>
190186
<gson.version>2.11.0</gson.version>
191187
<cache.version>1.1.1</cache.version>
192-
<flink.version>1.19.1</flink.version>
188+
<flink.version>1.20.0</flink.version>
193189
<hazelcast.version>5.2.0</hazelcast.version>
194190
<javassist.version>3.29.2-GA</javassist.version>
195191
<caffeine.version>3.1.8</caffeine.version>

libraries-testing/pom.xml

-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@
8989
<artifactId>maven-surefire-plugin</artifactId>
9090
<version>${maven-surefire-plugin.version}</version>
9191
<configuration>
92-
<argLine>
93-
--add-opens java.base/java.lang=ALL-UNNAMED
94-
</argLine>
9592
<systemPropertyVariables>
9693
<pact.rootDir>target/mypacts</pact.rootDir>
9794
</systemPropertyVariables>

spring-reactive-modules/spring-reactive-data-couchbase/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@
8181
<groupId>org.apache.maven.plugins</groupId>
8282
<artifactId>maven-surefire-plugin</artifactId>
8383
<version>${maven-surefire-plugin.version}</version>
84-
<configuration>
85-
<argLine>
86-
--add-opens java.base/java.util=ALL-UNNAMED
87-
</argLine>
88-
</configuration>
8984
</plugin>
9085
<plugin>
9186
<groupId>org.springframework.boot</groupId>

spring-web-modules/spring-freemarker/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@
5656
<plugin>
5757
<groupId>org.apache.maven.plugins</groupId>
5858
<artifactId>maven-surefire-plugin</artifactId>
59-
<configuration>
60-
<argLine>
61-
--add-opens java.base/java.lang=ALL-UNNAMED
62-
</argLine>
63-
</configuration>
6459
</plugin>
6560
</plugins>
6661
</build>

testing-modules/junit-5-basics/pom.xml

+2-7
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@
6666
<groupId>org.apache.maven.plugins</groupId>
6767
<artifactId>maven-surefire-plugin</artifactId>
6868
<version>${maven-surefire-plugin.version}</version>
69-
<configuration>
70-
<argLine>
71-
--add-opens java.base/java.lang=ALL-UNNAMED
72-
</argLine>
73-
</configuration>
7469
</plugin>
7570
</plugins>
7671
</build>
@@ -137,8 +132,8 @@
137132
</profiles>
138133

139134
<properties>
140-
<spring.version>5.0.6.RELEASE</spring.version>
141-
<h2.version>1.4.197</h2.version> <!-- needs to be specified to be compatible with spring.version 5.0.6.RELEASE -->
135+
<spring.version>6.2.2</spring.version>
136+
<h2.version>1.4.197</h2.version>
142137
</properties>
143138

144139
</project>

testing-modules/junit-5/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6-
<!-- NOT NEEDED - JSP <groupId>com.baeldung</groupId> -->
76
<artifactId>junit-5</artifactId>
87
<version>1.0-SNAPSHOT</version>
98
<name>junit-5</name>

testing-modules/mocks/pom.xml

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
<artifactId>maven-surefire-plugin</artifactId>
4040
<version>${maven-surefire-plugin.version}</version>
4141
<configuration>
42-
<argLine>
43-
--add-opens java.base/java.lang=ALL-UNNAMED
44-
-Djdk.attach.allowAttachSelf
45-
</argLine>
4642
<disableXmlReport>true</disableXmlReport>
4743
<excludes>
4844
<exclude>**/testsuite/**/*UnitTest.java</exclude>
@@ -54,7 +50,7 @@
5450

5551
<properties>
5652
<javafaker.version>0.15</javafaker.version>
57-
<easymock.version>3.5.1</easymock.version>
53+
<easymock.version>5.5.0</easymock.version>
5854
<spring-test.version>5.3.25</spring-test.version>
5955
</properties>
6056

testing-modules/testing-libraries/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
<checkstyle-maven-plugin.version>3.0.0</checkstyle-maven-plugin.version>
219219
<spring-boot.version>2.4.3</spring-boot.version>
220220
<system-rules.version>1.19.0</system-rules.version>
221-
<system-lambda.version>1.0.0</system-lambda.version>
221+
<system-lambda.version>1.2.0</system-lambda.version>
222222
<system-stubs.version>2.1.6</system-stubs.version>
223223
<testng.version>7.8.0</testng.version>
224224
<junit.pioneer.version>2.1.0</junit.pioneer.version>

web-modules/bootique/pom.xml

+7-6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
<artifactId>bootique-test</artifactId>
4545
<scope>test</scope>
4646
</dependency>
47+
<dependency>
48+
<groupId>com.google.inject</groupId>
49+
<artifactId>guice</artifactId>
50+
<version>${guice.version}</version>
51+
</dependency>
4752
</dependencies>
4853

4954
<build>
@@ -57,18 +62,14 @@
5762
<groupId>org.apache.maven.plugins</groupId>
5863
<artifactId>maven-surefire-plugin</artifactId>
5964
<version>${maven-surefire-plugin.version}</version>
60-
<configuration>
61-
<argLine>
62-
--add-opens java.base/java.lang=ALL-UNNAMED
63-
</argLine>
64-
</configuration>
6565
</plugin>
6666
</plugins>
6767
</build>
6868

6969
<properties>
7070
<main.class>com.baeldung.bootique.App</main.class>
71-
<bootique-bom.version>0.23</bootique-bom.version>
71+
<bootique-bom.version>1.3</bootique-bom.version>
72+
<guice.version>7.0.0</guice.version>
7273
<maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
7374
</properties>
7475

0 commit comments

Comments
 (0)