Skip to content

Commit e7485a1

Browse files
dkapilEugen
authored andcommitted
Task/bael 8020 (eugenp#4919)
* BAEL-8020 Fix surefire configs of spring-5 projects -Removed surefire configurations from spring-5 projects * BAEL-8020 Fix surefire configs of spring-5 projects -Fixed surefire and junit configuration of spring-5-** projects -Fixed mavensurefire plugin to execute JUnit5 tests BAEL-8125 * BAEL-8020 Fix sure fire configs in spring5 project -Fixed dependency for junit-5 * BAEL-8020 Fix sure fire configs in spring5 project -Fixed dependency for junit5-migration * BAEL-8020 Fix surefire configs -Updated maven war plugin to 3.0.0 * BAEL-8020 Fix surefire configs -Upgraded surefire custom logger api version to 2.21.0 for all child projects * BAEL-8020 -Deleted empty test SpringBootMvcApplicationTests.java in spring-boot-mvc. -Renamed SpringBootMvcApplicationTests.java correct in spring-boot-vue * BAEL-8020 Fix surfire configs -Added junit vintage dependency to run junit4 tests
1 parent e35e842 commit e7485a1

22 files changed

Lines changed: 83 additions & 325 deletions

File tree

‎core-java-sun/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
<avaitility.version>1.7.0</avaitility.version>
304304

305305
<!-- maven plugins -->
306-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
306+
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
307307
<sun-tools.version>1.8.0</sun-tools.version>
308308
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
309309
</properties>

‎core-java/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@
530530
<assertj-core.version>3.10.0</assertj-core.version>
531531

532532
<!-- maven plugins -->
533-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
533+
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
534534
<springframework.spring-web.version>4.3.4.RELEASE</springframework.spring-web.version>
535535
<springframework.boot.spring-boot-starter.version>1.5.8.RELEASE</springframework.boot.spring-boot-starter.version>
536536

‎java-numbers/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<jmh-core.version>1.19</jmh-core.version>
157157
<jmh-generator-annprocess.version>1.19</jmh-generator-annprocess.version>
158158

159-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
159+
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
160160
<maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
161161
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
162162
</properties>

‎jee-7/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@
418418
<arquillian-glassfish.version>1.0.0.Final</arquillian-glassfish.version>
419419
<maven-war-plugin.version>2.6</maven-war-plugin.version>
420420
<org.springframework.security.version>4.2.3.RELEASE</org.springframework.security.version>
421-
<maven-surefire-plugin.version>2.17</maven-surefire-plugin.version>
421+
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
422422
<taglibs.standard.version>1.1.2</taglibs.standard.version>
423423
<commons-io.version>2.4</commons-io.version>
424424
<com.sun.faces.jsf.version>2.2.14</com.sun.faces.jsf.version>

‎mustache/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153

154154
<!-- maven plugins -->
155155
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
156-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
156+
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
157157
<datafactory.version>0.8</datafactory.version>
158158
<webjars.bootstrap.version>3.3.7</webjars.bootstrap.version>
159159
<java.version>1.8</java.version>

‎parent-boot-2/pom.xml‎

Lines changed: 24 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -8,98 +8,44 @@
88
<description>Parent for all Spring Boot 2 modules</description>
99

1010
<parent>
11-
<groupId>org.springframework.boot</groupId>
12-
<artifactId>spring-boot-starter-parent</artifactId>
13-
<version>2.0.1.RELEASE</version>
14-
<relativePath />
11+
<groupId>com.baeldung</groupId>
12+
<artifactId>parent-modules</artifactId>
13+
<version>1.0.0-SNAPSHOT</version>
1514
</parent>
1615

16+
<dependencyManagement>
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.springframework.boot</groupId>
20+
<artifactId>spring-boot-dependencies</artifactId>
21+
<version>2.0.1.RELEASE</version>
22+
<type>pom</type>
23+
<scope>import</scope>
24+
</dependency>
25+
</dependencies>
26+
</dependencyManagement>
1727
<dependencies>
1828
<dependency>
1929
<groupId>io.rest-assured</groupId>
2030
<artifactId>rest-assured</artifactId>
21-
<version>${rest-assured.version}</version>
22-
</dependency>
31+
</dependency>
2332
<dependency>
2433
<groupId>org.springframework.boot</groupId>
2534
<artifactId>spring-boot-starter-test</artifactId>
2635
<scope>test</scope>
2736
</dependency>
2837
</dependencies>
2938

30-
<build>
31-
<plugins>
32-
<plugin>
33-
<groupId>org.springframework.boot</groupId>
34-
<artifactId>spring-boot-maven-plugin</artifactId>
35-
</plugin>
36-
<plugin>
37-
<groupId>org.apache.maven.plugins</groupId>
38-
<artifactId>maven-surefire-plugin</artifactId>
39-
<version>${maven-surefire-plugin.version}</version>
40-
<configuration>
41-
<forkCount>3</forkCount>
42-
<reuseForks>true</reuseForks>
43-
<excludes>
44-
<exclude>**/*IntegrationTest.java</exclude>
45-
<exclude>**/*IntTest.java</exclude>
46-
<exclude>**/*LongRunningUnitTest.java</exclude>
47-
<exclude>**/*ManualTest.java</exclude>
48-
<exclude>**/*LiveTest.java</exclude>
49-
</excludes>
50-
</configuration>
51-
</plugin>
52-
<plugin>
53-
<groupId>org.apache.maven.plugins</groupId>
54-
<artifactId>maven-compiler-plugin</artifactId>
55-
<version>${maven-compiler-plugin.version}</version>
56-
<configuration>
57-
<source>${maven.compiler.source}</source>
58-
<target>${maven.compiler.target}</target>
59-
</configuration>
60-
</plugin>
61-
</plugins>
62-
</build>
63-
39+
<build>
40+
<plugins>
41+
<plugin>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-maven-plugin</artifactId>
44+
<version>2.0.1.RELEASE</version>
45+
</plugin>
46+
</plugins>
47+
</build>
6448
<profiles>
65-
<profile>
66-
<id>integration</id>
67-
<build>
68-
<plugins>
69-
<plugin>
70-
<groupId>org.apache.maven.plugins</groupId>
71-
<artifactId>maven-surefire-plugin</artifactId>
72-
<executions>
73-
<execution>
74-
<phase>integration-test</phase>
75-
<goals>
76-
<goal>test</goal>
77-
</goals>
78-
<configuration>
79-
<excludes>
80-
<exclude>**/*ManualTest.java</exclude>
81-
<exclude>**/*LiveTest.java</exclude>
82-
<exclude>**/AutoconfigurationTest.java</exclude>
83-
<exclude>**/*UnitTest.java</exclude>
84-
</excludes>
85-
<includes>
86-
<include>**/*IntegrationTest.java</include>
87-
<include>**/*IntTest.java</include>
88-
<include>*/EthControllerTestOne.java</include>
89-
<include>**/*EntryPointsTest.java</include>
90-
</includes>
91-
</configuration>
92-
</execution>
93-
</executions>
94-
<configuration>
95-
<systemPropertyVariables>
96-
<test.mime>json</test.mime>
97-
</systemPropertyVariables>
98-
</configuration>
99-
</plugin>
100-
</plugins>
101-
</build>
102-
</profile>
10349
<profile>
10450
<id>thin-jar</id>
10551
<build>
@@ -122,13 +68,8 @@
12268
</profiles>
12369

12470
<properties>
125-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
126-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
127-
<java.version>1.8</java.version>
12871
<rest-assured.version>3.1.0</rest-assured.version>
12972
<!-- plugins -->
130-
<maven.compiler.source>1.8</maven.compiler.source>
131-
<maven.compiler.target>1.8</maven.compiler.target>
13273
<thin.version>1.0.11.RELEASE</thin.version>
13374
</properties>
13475

‎pom.xml‎

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,15 @@
4343
<dependency>
4444
<groupId>org.junit.jupiter</groupId>
4545
<artifactId>junit-jupiter-engine</artifactId>
46-
<version>${junit.jupiter.version}</version>
46+
<version>${junit-jupiter.version}</version>
4747
<scope>test</scope>
4848
</dependency>
49+
<dependency>
50+
<groupId>org.junit.jupiter</groupId>
51+
<artifactId>junit-jupiter-api</artifactId>
52+
<version>${junit-jupiter.version}</version>
53+
<scope>test</scope>
54+
</dependency>
4955
<dependency>
5056
<groupId>org.hamcrest</groupId>
5157
<artifactId>hamcrest-core</artifactId>
@@ -70,6 +76,14 @@
7076
<version>${mockito.version}</version>
7177
<scope>test</scope>
7278
</dependency>
79+
<dependency>
80+
<groupId>org.apache.maven.surefire</groupId>
81+
<artifactId>surefire-logger-api</artifactId>
82+
<version>${maven-surefire-plugin.version}</version>
83+
<!-- to get around bug https://github.com/junit-team/junit5/issues/801 -->
84+
<scope>test</scope>
85+
<optional>true</optional>
86+
</dependency>
7387
</dependencies>
7488

7589
<build>
@@ -98,6 +112,23 @@
98112
<exclude>**/*LiveTest.java</exclude>
99113
</excludes>
100114
</configuration>
115+
<dependencies>
116+
<dependency>
117+
<groupId>org.junit.platform</groupId>
118+
<artifactId>junit-platform-surefire-provider</artifactId>
119+
<version>${junit-platform.version}</version>
120+
</dependency>
121+
<dependency>
122+
<groupId>org.junit.jupiter</groupId>
123+
<artifactId>junit-jupiter-engine</artifactId>
124+
<version>${junit-jupiter.version}</version>
125+
</dependency>
126+
<dependency>
127+
<groupId>org.junit.vintage</groupId>
128+
<artifactId>junit-vintage-engine</artifactId>
129+
<version>${junit-jupiter.version}</version>
130+
</dependency>
131+
</dependencies>
101132
</plugin>
102133
<plugin>
103134
<groupId>org.apache.maven.plugins</groupId>
@@ -187,6 +218,10 @@
187218
</execution>
188219
</executions>
189220
</plugin>
221+
<plugin>
222+
<artifactId>maven-war-plugin</artifactId>
223+
<version>${maven-war-plugin.version}</version>
224+
</plugin>
190225
</plugins>
191226
<extensions>
192227
<extension>
@@ -406,6 +441,7 @@
406441
<module>spring-4</module>
407442
<module>spring-5</module>
408443
<module>spring-5-reactive</module>
444+
<module>spring-5-reactive-client</module>
409445
<module>spring-5-mvc</module>
410446
<module>spring-5-security</module>
411447
<module>spring-activiti</module>
@@ -663,6 +699,7 @@
663699
<module>spring-4</module>
664700
<module>spring-5</module>
665701
<module>spring-5-reactive</module>
702+
<module>spring-5-reactive-client</module>
666703
<module>spring-5-mvc</module>
667704
<module>spring-5-security</module>
668705
<module>spring-activiti</module>
@@ -942,6 +979,7 @@
942979
<module>spark-java</module>
943980
<module>spring-4</module>
944981
<module>spring-5-reactive</module>
982+
<module>spring-5-reactive-client</module>
945983
<module>spring-5-mvc</module>
946984
<module>spring-5-security</module>
947985
<module>spring-activiti</module>
@@ -1220,15 +1258,16 @@
12201258
<maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
12211259
<commons-io.version>2.5</commons-io.version>
12221260
<commons-cli.version>1.4</commons-cli.version>
1223-
<maven-war-plugin.version>2.6</maven-war-plugin.version>
1261+
<maven-war-plugin.version>3.0.0</maven-war-plugin.version>
12241262
<javax.servlet-api.version>3.1.0</javax.servlet-api.version>
12251263
<jstl-api.version>1.2</jstl-api.version>
12261264
<javax.servlet.jsp-api.version>2.3.1</javax.servlet.jsp-api.version>
12271265
<jackson-mapper-asl.version>1.9.13</jackson-mapper-asl.version>
12281266
<jstl.version>1.2</jstl.version>
12291267
<jackson-databind.version>2.5.0</jackson-databind.version>
12301268
<commons-fileupload.version>1.3</commons-fileupload.version>
1231-
<junit.jupiter.version>5.0.2</junit.jupiter.version>
1269+
<junit-platform.version>1.2.0</junit-platform.version>
1270+
<junit-jupiter.version>5.2.0</junit-jupiter.version>
12321271
<directory-maven-plugin.version>0.3.1</directory-maven-plugin.version>
12331272
<maven-install-plugin.version>2.5.1</maven-install-plugin.version>
12341273
<custom-pmd.version>0.0.1</custom-pmd.version>

‎spring-5-mvc/pom.xml‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@
8282
<artifactId>spring-boot-starter-test</artifactId>
8383
<scope>test</scope>
8484
</dependency>
85-
<dependency>
86-
<groupId>junit</groupId>
87-
<artifactId>junit</artifactId>
88-
<scope>test</scope>
89-
</dependency>
9085
<dependency>
9186
<groupId>com.jayway.restassured</groupId>
9287
<artifactId>rest-assured</artifactId>
@@ -137,19 +132,6 @@
137132
</dependency>
138133
</dependencies>
139134
</plugin>
140-
<plugin>
141-
<groupId>org.apache.maven.plugins</groupId>
142-
<artifactId>maven-surefire-plugin</artifactId>
143-
<configuration>
144-
145-
<failIfNoTests>false</failIfNoTests>
146-
<excludes>
147-
<exclude>**/*IntegrationTest.java</exclude>
148-
<exclude>**/*IntTest.java</exclude>
149-
<exclude>**/*LiveTest.java</exclude>
150-
</excludes>
151-
</configuration>
152-
</plugin>
153135
</plugins>
154136
</build>
155137

0 commit comments

Comments
 (0)