From e7485a181318f1cc0f2a54bdb4fe0d437594207f Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Thu, 9 Aug 2018 21:43:44 +0530 Subject: [PATCH] Task/bael 8020 (#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 --- core-java-sun/pom.xml | 2 +- core-java/pom.xml | 2 +- java-numbers/pom.xml | 2 +- jee-7/pom.xml | 2 +- mustache/pom.xml | 2 +- parent-boot-2/pom.xml | 107 ++++-------------- pom.xml | 45 +++++++- spring-5-mvc/pom.xml | 18 --- spring-5-reactive-client/pom.xml | 61 +--------- spring-5-reactive/pom.xml | 55 --------- spring-5-security/pom.xml | 16 --- ...nMemoryAuthControllerIntegrationTest.java} | 2 +- spring-5/pom.xml | 55 --------- .../SpringBootMvcApplicationTests.java | 16 --- ... => SpringBootMvcApplicationUnitTest.java} | 2 +- spring-boot/pom.xml | 1 + .../spring-cloud-connectors-heroku/pom.xml | 2 +- spring-reactive-kotlin/pom.xml | 3 - spring-rest-embedded-tomcat/pom.xml | 1 - testing-modules/junit-5/pom.xml | 6 +- testing-modules/junit5-migration/pom.xml | 6 +- testing-modules/test-containers/pom.xml | 2 +- 22 files changed, 83 insertions(+), 325 deletions(-) rename spring-5-security/src/test/java/com/baeldung/inmemory/{InMemoryAuthControllerTest.java => InMemoryAuthControllerIntegrationTest.java} (97%) delete mode 100644 spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationTests.java rename spring-boot-vue/src/test/java/com/baeldung/springbootmvc/{SpringBootMvcApplicationTests.java => SpringBootMvcApplicationUnitTest.java} (96%) diff --git a/core-java-sun/pom.xml b/core-java-sun/pom.xml index f489f3b030..7292335232 100644 --- a/core-java-sun/pom.xml +++ b/core-java-sun/pom.xml @@ -303,7 +303,7 @@ 1.7.0 - 2.19.1 + 2.21.0 1.8.0 3.0.2 diff --git a/core-java/pom.xml b/core-java/pom.xml index b83cb478d4..3f44851f97 100644 --- a/core-java/pom.xml +++ b/core-java/pom.xml @@ -530,7 +530,7 @@ 3.10.0 - 2.19.1 + 2.21.0 4.3.4.RELEASE 1.5.8.RELEASE diff --git a/java-numbers/pom.xml b/java-numbers/pom.xml index a9fb556517..bf4d3e8792 100644 --- a/java-numbers/pom.xml +++ b/java-numbers/pom.xml @@ -156,7 +156,7 @@ 1.19 1.19 - 2.19.1 + 2.21.0 3.0.0-M1 3.0.2 diff --git a/jee-7/pom.xml b/jee-7/pom.xml index d0246f650a..fbf102185d 100644 --- a/jee-7/pom.xml +++ b/jee-7/pom.xml @@ -418,7 +418,7 @@ 1.0.0.Final 2.6 4.2.3.RELEASE - 2.17 + 2.21.0 1.1.2 2.4 2.2.14 diff --git a/mustache/pom.xml b/mustache/pom.xml index 6012c9a15a..d385246182 100644 --- a/mustache/pom.xml +++ b/mustache/pom.xml @@ -153,7 +153,7 @@ 3.7.0 - 2.19.1 + 2.21.0 0.8 3.3.7 1.8 diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml index ab6162a5a5..2fc46e4c28 100644 --- a/parent-boot-2/pom.xml +++ b/parent-boot-2/pom.xml @@ -8,18 +8,27 @@ Parent for all Spring Boot 2 modules - org.springframework.boot - spring-boot-starter-parent - 2.0.1.RELEASE - + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + + + + org.springframework.boot + spring-boot-dependencies + 2.0.1.RELEASE + pom + import + + + io.rest-assured rest-assured - ${rest-assured.version} - + org.springframework.boot spring-boot-starter-test @@ -27,79 +36,16 @@ - - - - org.springframework.boot - spring-boot-maven-plugin - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - 3 - true - - **/*IntegrationTest.java - **/*IntTest.java - **/*LongRunningUnitTest.java - **/*ManualTest.java - **/*LiveTest.java - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${maven.compiler.source} - ${maven.compiler.target} - - - - - + + + + org.springframework.boot + spring-boot-maven-plugin + 2.0.1.RELEASE + + + - - integration - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*ManualTest.java - **/*LiveTest.java - **/AutoconfigurationTest.java - **/*UnitTest.java - - - **/*IntegrationTest.java - **/*IntTest.java - */EthControllerTestOne.java - **/*EntryPointsTest.java - - - - - - - json - - - - - - thin-jar @@ -122,13 +68,8 @@ - UTF-8 - UTF-8 - 1.8 3.1.0 - 1.8 - 1.8 1.0.11.RELEASE diff --git a/pom.xml b/pom.xml index a9aaff3e22..978e27f055 100644 --- a/pom.xml +++ b/pom.xml @@ -43,9 +43,15 @@ org.junit.jupiter junit-jupiter-engine - ${junit.jupiter.version} + ${junit-jupiter.version} test + + org.junit.jupiter + junit-jupiter-api + ${junit-jupiter.version} + test + org.hamcrest hamcrest-core @@ -70,6 +76,14 @@ ${mockito.version} test + + org.apache.maven.surefire + surefire-logger-api + ${maven-surefire-plugin.version} + + test + true + @@ -98,6 +112,23 @@ **/*LiveTest.java + + + org.junit.platform + junit-platform-surefire-provider + ${junit-platform.version} + + + org.junit.jupiter + junit-jupiter-engine + ${junit-jupiter.version} + + + org.junit.vintage + junit-vintage-engine + ${junit-jupiter.version} + + org.apache.maven.plugins @@ -187,6 +218,10 @@ + + maven-war-plugin + ${maven-war-plugin.version} + @@ -406,6 +441,7 @@ spring-4 spring-5 spring-5-reactive + spring-5-reactive-client spring-5-mvc spring-5-security spring-activiti @@ -663,6 +699,7 @@ spring-4 spring-5 spring-5-reactive + spring-5-reactive-client spring-5-mvc spring-5-security spring-activiti @@ -942,6 +979,7 @@ spark-java spring-4 spring-5-reactive + spring-5-reactive-client spring-5-mvc spring-5-security spring-activiti @@ -1220,7 +1258,7 @@ 2.19.1 2.5 1.4 - 2.6 + 3.0.0 3.1.0 1.2 2.3.1 @@ -1228,7 +1266,8 @@ 1.2 2.5.0 1.3 - 5.0.2 + 1.2.0 + 5.2.0 0.3.1 2.5.1 0.0.1 diff --git a/spring-5-mvc/pom.xml b/spring-5-mvc/pom.xml index 0408550c79..2d28eb741e 100644 --- a/spring-5-mvc/pom.xml +++ b/spring-5-mvc/pom.xml @@ -82,11 +82,6 @@ spring-boot-starter-test test - - junit - junit - test - com.jayway.restassured rest-assured @@ -137,19 +132,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - - false - - **/*IntegrationTest.java - **/*IntTest.java - **/*LiveTest.java - - - diff --git a/spring-5-reactive-client/pom.xml b/spring-5-reactive-client/pom.xml index 9388ee83c1..f60832d545 100644 --- a/spring-5-reactive-client/pom.xml +++ b/spring-5-reactive-client/pom.xml @@ -11,8 +11,8 @@ spring 5 sample project about new features - parent-boot-2 com.baeldung + parent-boot-2 0.0.1-SNAPSHOT ../parent-boot-2 @@ -43,20 +43,6 @@ javax.json.bind javax.json.bind-api - - - - - - - - - - - - - - org.apache.geronimo.specs geronimo-json_1.1_spec @@ -102,28 +88,6 @@ test - - org.junit.jupiter - junit-jupiter-api - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.platform - junit-platform-surefire-provider - ${junit.platform.version} - test - - - org.junit.platform - junit-platform-runner - ${junit.platform.version} - test - - org.projectlombok lombok @@ -145,22 +109,6 @@ JAR - - - org.apache.maven.plugins - maven-surefire-plugin - - 3 - true - methods - true - - **/*IntegrationTest.java - **/*IntTest.java - **/*LiveTest.java - - - @@ -186,13 +134,6 @@ - UTF-8 - UTF-8 - 1.8 - 1.0.0 - 5.0.0 - 2.20 - 5.0.2.RELEASE 1.0.1.RELEASE 1.1.3 1.0 diff --git a/spring-5-reactive/pom.xml b/spring-5-reactive/pom.xml index acc82be0d1..f89fd45581 100644 --- a/spring-5-reactive/pom.xml +++ b/spring-5-reactive/pom.xml @@ -43,20 +43,6 @@ org.springframework.boot spring-boot-starter-actuator - - - - - - - - - - - - - - org.projectlombok lombok @@ -100,28 +86,6 @@ ${commons-collections4.version} test - - - org.junit.jupiter - junit-jupiter-api - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.platform - junit-platform-surefire-provider - ${junit.platform.version} - test - - - org.junit.platform - junit-platform-runner - ${junit.platform.version} - test - org.apache.commons commons-lang3 @@ -159,29 +123,10 @@ JAR - - - org.apache.maven.plugins - maven-surefire-plugin - - 3 - true - methods - true - - **/*IntegrationTest.java - **/*IntTest.java - **/*LiveTest.java - - - - 1.0.0 - 5.0.2 - 2.20 1.0.1.RELEASE 2.1.12 1.1.3 diff --git a/spring-5-security/pom.xml b/spring-5-security/pom.xml index 7024e6f873..ebcd6556a4 100644 --- a/spring-5-security/pom.xml +++ b/spring-5-security/pom.xml @@ -76,22 +76,6 @@ JAR - - - org.apache.maven.plugins - maven-surefire-plugin - - 3 - true - methods - true - - **/*IntegrationTest.java - **/*IntTest.java - **/*LiveTest.java - - - diff --git a/spring-5-security/src/test/java/com/baeldung/inmemory/InMemoryAuthControllerTest.java b/spring-5-security/src/test/java/com/baeldung/inmemory/InMemoryAuthControllerIntegrationTest.java similarity index 97% rename from spring-5-security/src/test/java/com/baeldung/inmemory/InMemoryAuthControllerTest.java rename to spring-5-security/src/test/java/com/baeldung/inmemory/InMemoryAuthControllerIntegrationTest.java index 7a8ea7b248..9d08cb7cfa 100644 --- a/spring-5-security/src/test/java/com/baeldung/inmemory/InMemoryAuthControllerTest.java +++ b/spring-5-security/src/test/java/com/baeldung/inmemory/InMemoryAuthControllerIntegrationTest.java @@ -14,7 +14,7 @@ import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest(classes = InMemoryAuthApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) -public class InMemoryAuthControllerTest { +public class InMemoryAuthControllerIntegrationTest { @Autowired private TestRestTemplate template; diff --git a/spring-5/pom.xml b/spring-5/pom.xml index e37833ff94..9f60b8a364 100644 --- a/spring-5/pom.xml +++ b/spring-5/pom.xml @@ -41,18 +41,6 @@ javax.json.bind javax.json.bind-api - - - - - - - - - - - - org.apache.geronimo.specs geronimo-json_1.1_spec @@ -85,45 +73,21 @@ org.springframework spring-test - - org.springframework.boot - spring-boot-starter-test - test - org.springframework.security spring-security-test test - org.apache.commons commons-collections4 ${commons-collections4.version} test - org.junit.jupiter junit-jupiter-api - - org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.platform - junit-platform-surefire-provider - ${junit.platform.version} - test - - - org.junit.platform - junit-platform-runner - ${junit.platform.version} - test - org.springframework.restdocs @@ -147,22 +111,6 @@ JAR - - - org.apache.maven.plugins - maven-surefire-plugin - - 3 - true - methods - true - - **/*IntegrationTest.java - **/*IntTest.java - **/*LiveTest.java - - - org.asciidoctor asciidoctor-maven-plugin @@ -190,9 +138,6 @@ - 1.0.0 - 5.0.2.RELEASE - 1.0.1.RELEASE 1.0 1.5.6 4.1 diff --git a/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationTests.java b/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationTests.java deleted file mode 100644 index 1add635ed8..0000000000 --- a/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationTests.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.baeldung.springbootmvc; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@SpringBootTest -public class SpringBootMvcApplicationTests { - - @Test - public void contextLoads() { - } - -} diff --git a/spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationTests.java b/spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationUnitTest.java similarity index 96% rename from spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationTests.java rename to spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationUnitTest.java index 6364351eb3..567b239ed2 100644 --- a/spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationTests.java +++ b/spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationUnitTest.java @@ -16,7 +16,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. @RunWith(SpringRunner.class) @SpringBootTest @AutoConfigureMockMvc -public class SpringBootMvcApplicationTests { +public class SpringBootMvcApplicationUnitTest { @Autowired private MockMvc mockMvc; diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml index ef30600d45..c0e386a679 100644 --- a/spring-boot/pom.xml +++ b/spring-boot/pom.xml @@ -222,6 +222,7 @@ 3.6.0 3.2.0 18.0 + 1.2.0 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-connectors-heroku/pom.xml b/spring-cloud/spring-cloud-connectors-heroku/pom.xml index 875aa5ceaa..f25c190d56 100644 --- a/spring-cloud/spring-cloud-connectors-heroku/pom.xml +++ b/spring-cloud/spring-cloud-connectors-heroku/pom.xml @@ -79,7 +79,7 @@ Brixton.SR7 - 2.19.1 + 2.21.0 9.4-1201-jdbc4 diff --git a/spring-reactive-kotlin/pom.xml b/spring-reactive-kotlin/pom.xml index 8eafe9f217..f2f0dc58ec 100644 --- a/spring-reactive-kotlin/pom.xml +++ b/spring-reactive-kotlin/pom.xml @@ -19,9 +19,6 @@ - UTF-8 - UTF-8 - 1.8 1.2.41 diff --git a/spring-rest-embedded-tomcat/pom.xml b/spring-rest-embedded-tomcat/pom.xml index edccbb17d5..1a1adce6db 100644 --- a/spring-rest-embedded-tomcat/pom.xml +++ b/spring-rest-embedded-tomcat/pom.xml @@ -85,7 +85,6 @@ - 2.19.1 2.9.2 1.8 1.8 diff --git a/testing-modules/junit-5/pom.xml b/testing-modules/junit-5/pom.xml index c60cc00c2c..93365264ac 100644 --- a/testing-modules/junit-5/pom.xml +++ b/testing-modules/junit-5/pom.xml @@ -118,14 +118,14 @@ - 5.1.0 - 1.1.0 + 5.2.0 + 1.2.0 5.2.0 2.8.2 1.4.196 2.8.9 1.7.4 - 2.19.1 + 2.21.0 1.6.0 5.0.1.RELEASE diff --git a/testing-modules/junit5-migration/pom.xml b/testing-modules/junit5-migration/pom.xml index ae46b479bb..9d9d418774 100644 --- a/testing-modules/junit5-migration/pom.xml +++ b/testing-modules/junit5-migration/pom.xml @@ -80,10 +80,10 @@ - 5.1.0 - 1.1.0 + 5.2.0 + 1.2.0 5.2.0 - 2.19.1 + 2.21.0 1.6.0 diff --git a/testing-modules/test-containers/pom.xml b/testing-modules/test-containers/pom.xml index 2a8f434040..0ace187555 100644 --- a/testing-modules/test-containers/pom.xml +++ b/testing-modules/test-containers/pom.xml @@ -109,7 +109,7 @@ 1.7.2 42.2.2 3.12.0 - 2.19.1 + 2.21.0