From eb17d0e2edecca9ce57874870041aeac877b28a9 Mon Sep 17 00:00:00 2001 From: panos-kakos <102670093+panos-kakos@users.noreply.github.com> Date: Wed, 19 Oct 2022 19:47:05 +0100 Subject: [PATCH] [JAVA-13966] Upgraded h2 database to 2.1.214 + clean up (#12711) * [JAVA-13966] Upgraded h2 database to 2.1.214 * [JAVA-13966] fixed tests for libraries-apache-commons * [JAVA-13966] fixed tests * [JAVA-13966] fixed tests * [JAVA-13966] fixed tests JAVA-JPA MODULE * [JAVA-13966] Made ninja submodule part of web-modules(parent) * [JAVA-13966] Fixed naming convention for pmd * [JAVA-13966] Moved tests of ninja-module to ManualTest category * [JAVA-13966] Fix tests Co-authored-by: panagiotiskakos --- .../core-java-exceptions-4/pom.xml | 4 ---- core-java-modules/core-java-jndi/pom.xml | 1 - .../src/test/resources/employees.sql | 20 +++++++++---------- libraries-testing/pom.xml | 1 + .../src/test/resources/dbunit/schema.sql | 15 ++++++-------- .../core-java-persistence-2/pom.xml | 1 + persistence-modules/deltaspike/pom.xml | 1 + persistence-modules/flyway/pom.xml | 1 - .../hibernate-annotations/pom.xml | 1 - persistence-modules/hibernate-queries/pom.xml | 1 + persistence-modules/hibernate5/pom.xml | 1 + persistence-modules/java-jpa-2/pom.xml | 1 + persistence-modules/java-jpa-3/pom.xml | 1 + .../main/resources/META-INF/persistence.xml | 2 +- .../read-only-transactions/pom.xml | 1 - persistence-modules/spring-jooq/pom.xml | 2 +- persistence-modules/spring-mybatis/pom.xml | 1 - pom.xml | 2 +- .../oauth2-authorization-server/pom.xml | 1 - spring-integration/pom.xml | 1 - web-modules/ninja/pom.xml | 8 ++++++-- ... => ApiControllerDocTesterManualTest.java} | 2 +- ....java => ApiControllerMockManualTest.java} | 2 +- 23 files changed, 34 insertions(+), 37 deletions(-) rename web-modules/ninja/src/test/java/controllers/{ApiControllerDocTesterTest.java => ApiControllerDocTesterManualTest.java} (91%) rename web-modules/ninja/src/test/java/controllers/{ApiControllerMockUnitTest.java => ApiControllerMockManualTest.java} (94%) diff --git a/core-java-modules/core-java-exceptions-4/pom.xml b/core-java-modules/core-java-exceptions-4/pom.xml index e691e1446d..e9eb1bf379 100644 --- a/core-java-modules/core-java-exceptions-4/pom.xml +++ b/core-java-modules/core-java-exceptions-4/pom.xml @@ -46,8 +46,4 @@ - - 1.4.191 - - \ No newline at end of file diff --git a/core-java-modules/core-java-jndi/pom.xml b/core-java-modules/core-java-jndi/pom.xml index 68b7f9361f..23a2fe3bfb 100644 --- a/core-java-modules/core-java-jndi/pom.xml +++ b/core-java-modules/core-java-jndi/pom.xml @@ -64,7 +64,6 @@ 5.0.9.RELEASE - 1.4.199 2.0.0.AM26 1.8 1.8 diff --git a/libraries-apache-commons/src/test/resources/employees.sql b/libraries-apache-commons/src/test/resources/employees.sql index c6109724cf..a55243c3dc 100644 --- a/libraries-apache-commons/src/test/resources/employees.sql +++ b/libraries-apache-commons/src/test/resources/employees.sql @@ -21,17 +21,17 @@ CREATE TABLE employee_legacy( ); -INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('John', 'Doe', 10000.10, to_date('01-01-2001','dd-mm-yyyy')); -INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Kevin', 'Smith', 20000.20, to_date('02-02-2002','dd-mm-yyyy')); -INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Kim', 'Smith', 30000.30, to_date('03-03-2003','dd-mm-yyyy')); -INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Stephen', 'Torvalds', 40000.40, to_date('04-04-2004','dd-mm-yyyy')); -INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Christian', 'Reynolds', 50000.50, to_date('05-05-2005','dd-mm-yyyy')); +INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('John', 'Doe', 10000.10, PARSEDATETIME('20010101','yyyyMMdd')); +INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Kevin', 'Smith', 20000.20, PARSEDATETIME('20020202','yyyyMMdd')); +INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Kim', 'Smith', 30000.30, PARSEDATETIME('20030303','yyyyMMdd')); +INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Stephen', 'Torvalds', 40000.40, PARSEDATETIME('20040404','yyyyMMdd')); +INSERT INTO employee (firstname,lastname,salary,hireddate) VALUES ('Christian', 'Reynolds', 50000.50, PARSEDATETIME('20050505','yyyyMMdd')); -INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('John', 'Doe', 10000.10, to_date('01-01-2001','dd-mm-yyyy')); -INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Kevin', 'Smith', 20000.20, to_date('02-02-2002','dd-mm-yyyy')); -INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Kim', 'Smith', 30000.30, to_date('03-03-2003','dd-mm-yyyy')); -INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Stephen', 'Torvalds', 40000.40, to_date('04-04-2004','dd-mm-yyyy')); -INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Christian', 'Reynolds', 50000.50, to_date('05-05-2005','dd-mm-yyyy')); +INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('John', 'Doe', 10000.10, PARSEDATETIME('20010101','yyyyMMdd')); +INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Kevin', 'Smith', 20000.20, PARSEDATETIME('20020202','yyyyMMdd')); +INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Kim', 'Smith', 30000.30, PARSEDATETIME('20030303','yyyyMMdd')); +INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Stephen', 'Torvalds', 40000.40, PARSEDATETIME('20040404','yyyyMMdd')); +INSERT INTO employee_legacy (first_name,last_name,salary,hired_date) VALUES ('Christian', 'Reynolds', 50000.50, PARSEDATETIME('20050505','yyyyMMdd')); INSERT INTO email (employeeid,address) VALUES (1, 'john@baeldung.com'); INSERT INTO email (employeeid,address) VALUES (1, 'john@gmail.com'); diff --git a/libraries-testing/pom.xml b/libraries-testing/pom.xml index 279cb20225..15b454d5c6 100644 --- a/libraries-testing/pom.xml +++ b/libraries-testing/pom.xml @@ -189,6 +189,7 @@ 2.7.0 0.14.1 1.0.0 + 1.4.200 \ No newline at end of file diff --git a/libraries-testing/src/test/resources/dbunit/schema.sql b/libraries-testing/src/test/resources/dbunit/schema.sql index c2a8d2d630..42aa39c7b3 100644 --- a/libraries-testing/src/test/resources/dbunit/schema.sql +++ b/libraries-testing/src/test/resources/dbunit/schema.sql @@ -1,28 +1,25 @@ CREATE TABLE IF NOT EXISTS CLIENTS ( - `id` int AUTO_INCREMENT NOT NULL, + `id` int PRIMARY KEY AUTO_INCREMENT NOT NULL, `first_name` varchar(100) NOT NULL, - `last_name` varchar(100) NOT NULL, - PRIMARY KEY (`id`) + `last_name` varchar(100) NOT NULL ); CREATE TABLE IF NOT EXISTS ITEMS ( - `id` int AUTO_INCREMENT NOT NULL, + `id` int PRIMARY KEY AUTO_INCREMENT NOT NULL, `title` varchar(100) NOT NULL, `produced` date, - `price` float, - PRIMARY KEY (`id`) + `price` float ); CREATE TABLE IF NOT EXISTS PURCHASES ( - `id` int NOT NULL AUTO_INCREMENT, + `id` int PRIMARY KEY AUTO_INCREMENT NOT NULL, `id_user` int NOT NULL, `id_item` int NOT NULL, `total_price` float NOT NULL, - `quantity` int(11) NOT NULL, - PRIMARY KEY (`id`), + `quantity` int NOT NULL, FOREIGN KEY (`id_user`) REFERENCES CLIENTS (`id`) ON DELETE CASCADE, FOREIGN KEY (`id_item`) REFERENCES ITEMS (`id`) ON DELETE CASCADE ON UPDATE CASCADE ); diff --git a/persistence-modules/core-java-persistence-2/pom.xml b/persistence-modules/core-java-persistence-2/pom.xml index b92ee0d899..e07b73e07d 100644 --- a/persistence-modules/core-java-persistence-2/pom.xml +++ b/persistence-modules/core-java-persistence-2/pom.xml @@ -76,6 +76,7 @@ 3.11.11 20220320 07.00.00-MS-GA + 1.4.200 \ No newline at end of file diff --git a/persistence-modules/deltaspike/pom.xml b/persistence-modules/deltaspike/pom.xml index 0142e746a1..fda79414fa 100644 --- a/persistence-modules/deltaspike/pom.xml +++ b/persistence-modules/deltaspike/pom.xml @@ -290,6 +290,7 @@ 2.6 1.1.3 1.2.4.Final + 1.4.200 \ No newline at end of file diff --git a/persistence-modules/flyway/pom.xml b/persistence-modules/flyway/pom.xml index 67dd0644bd..18ff9fdb39 100644 --- a/persistence-modules/flyway/pom.xml +++ b/persistence-modules/flyway/pom.xml @@ -64,7 +64,6 @@ 8.5.13 - 2.1.214 \ No newline at end of file diff --git a/persistence-modules/hibernate-annotations/pom.xml b/persistence-modules/hibernate-annotations/pom.xml index 6c02b6c685..310b409a00 100644 --- a/persistence-modules/hibernate-annotations/pom.xml +++ b/persistence-modules/hibernate-annotations/pom.xml @@ -84,7 +84,6 @@ 1.10.6.RELEASE 5.6.7.Final true - 2.1.212 9.0.0.M26 diff --git a/persistence-modules/hibernate-queries/pom.xml b/persistence-modules/hibernate-queries/pom.xml index ff5a9fe221..a2949e1513 100644 --- a/persistence-modules/hibernate-queries/pom.xml +++ b/persistence-modules/hibernate-queries/pom.xml @@ -87,6 +87,7 @@ 9.0.0.M26 6.0.6 2.2.3 + 1.4.200 \ No newline at end of file diff --git a/persistence-modules/hibernate5/pom.xml b/persistence-modules/hibernate5/pom.xml index 6bec0d4981..8f5ab01f77 100644 --- a/persistence-modules/hibernate5/pom.xml +++ b/persistence-modules/hibernate5/pom.xml @@ -60,6 +60,7 @@ 5.4.12.Final 6.0.6 2.2.3 + 1.4.200 \ No newline at end of file diff --git a/persistence-modules/java-jpa-2/pom.xml b/persistence-modules/java-jpa-2/pom.xml index 884142f821..b736b50dd1 100644 --- a/persistence-modules/java-jpa-2/pom.xml +++ b/persistence-modules/java-jpa-2/pom.xml @@ -137,6 +137,7 @@ 3.3.3 3.0.0 4.3.1 + 1.4.200 \ No newline at end of file diff --git a/persistence-modules/java-jpa-3/pom.xml b/persistence-modules/java-jpa-3/pom.xml index c6930d6291..b9516281de 100644 --- a/persistence-modules/java-jpa-3/pom.xml +++ b/persistence-modules/java-jpa-3/pom.xml @@ -91,6 +91,7 @@ 3.5.1 3.3.3 3.0.0 + 1.4.200 \ No newline at end of file diff --git a/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml b/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml index b780a6f569..ca824b77bd 100644 --- a/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml +++ b/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml @@ -37,7 +37,7 @@ + value="jdbc:h2:mem:test;MODE=LEGACY" /> 2.6.1 5.3.13 5.8.2 - 1.4.200 \ No newline at end of file diff --git a/persistence-modules/spring-jooq/pom.xml b/persistence-modules/spring-jooq/pom.xml index 6a9fb0ef06..7998c9c6dd 100644 --- a/persistence-modules/spring-jooq/pom.xml +++ b/persistence-modules/spring-jooq/pom.xml @@ -199,7 +199,7 @@ 1.0.0 1.5 1.0.0 - 1.4.198 + 1.4.200 \ No newline at end of file diff --git a/persistence-modules/spring-mybatis/pom.xml b/persistence-modules/spring-mybatis/pom.xml index 65a8581f97..1b2223653b 100644 --- a/persistence-modules/spring-mybatis/pom.xml +++ b/persistence-modules/spring-mybatis/pom.xml @@ -83,7 +83,6 @@ 2.0.6 3.5.2 2.2.0 - 1.4.197 \ No newline at end of file diff --git a/pom.xml b/pom.xml index b076095586..2817850b89 100644 --- a/pom.xml +++ b/pom.xml @@ -1348,7 +1348,7 @@ 3.0.0 3.19.0 1.18.24 - 1.4.200 + 2.1.214 31.1-jre 3.2.2 diff --git a/security-modules/oauth2-framework-impl/oauth2-authorization-server/pom.xml b/security-modules/oauth2-framework-impl/oauth2-authorization-server/pom.xml index c206fc2e55..7f13e5acea 100644 --- a/security-modules/oauth2-framework-impl/oauth2-authorization-server/pom.xml +++ b/security-modules/oauth2-framework-impl/oauth2-authorization-server/pom.xml @@ -66,7 +66,6 @@ - 1.4.199 9080 9443 7.3 diff --git a/spring-integration/pom.xml b/spring-integration/pom.xml index f5aaa93ff7..2e0e242a56 100644 --- a/spring-integration/pom.xml +++ b/spring-integration/pom.xml @@ -119,7 +119,6 @@ 1.4.7 1.1.1 2.10 - 1.4.197 \ No newline at end of file diff --git a/web-modules/ninja/pom.xml b/web-modules/ninja/pom.xml index 36a28a0977..eb59a0ff9e 100644 --- a/web-modules/ninja/pom.xml +++ b/web-modules/ninja/pom.xml @@ -3,12 +3,17 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - com.baeldung ninja 1.0.0 jar http://www.ninjaframework.org + + com.baeldung + web-modules + 1.0.0-SNAPSHOT + + org.webjars @@ -200,7 +205,6 @@ 9.4.18.v20190429 3.3.4 2.1.3 - 1.4.186 3.2 1.8 1.8 diff --git a/web-modules/ninja/src/test/java/controllers/ApiControllerDocTesterTest.java b/web-modules/ninja/src/test/java/controllers/ApiControllerDocTesterManualTest.java similarity index 91% rename from web-modules/ninja/src/test/java/controllers/ApiControllerDocTesterTest.java rename to web-modules/ninja/src/test/java/controllers/ApiControllerDocTesterManualTest.java index d5f4f1811c..b77901c8e2 100644 --- a/web-modules/ninja/src/test/java/controllers/ApiControllerDocTesterTest.java +++ b/web-modules/ninja/src/test/java/controllers/ApiControllerDocTesterManualTest.java @@ -7,7 +7,7 @@ import org.doctester.testbrowser.Response; import org.junit.Test; import ninja.NinjaDocTester; -public class ApiControllerDocTesterTest extends NinjaDocTester { +public class ApiControllerDocTesterManualTest extends NinjaDocTester { String URL_INDEX = "/"; String URL_HELLO = "/hello"; diff --git a/web-modules/ninja/src/test/java/controllers/ApiControllerMockUnitTest.java b/web-modules/ninja/src/test/java/controllers/ApiControllerMockManualTest.java similarity index 94% rename from web-modules/ninja/src/test/java/controllers/ApiControllerMockUnitTest.java rename to web-modules/ninja/src/test/java/controllers/ApiControllerMockManualTest.java index cb53965678..2fa76bca4e 100644 --- a/web-modules/ninja/src/test/java/controllers/ApiControllerMockUnitTest.java +++ b/web-modules/ninja/src/test/java/controllers/ApiControllerMockManualTest.java @@ -10,7 +10,7 @@ import ninja.Result; import services.UserService; @RunWith(NinjaRunner.class) -public class ApiControllerMockUnitTest { +public class ApiControllerMockManualTest { @Inject private UserService userService;