From 0fbcc6fe5e0b7f72e3d6afe8705ea63b859edefa Mon Sep 17 00:00:00 2001 From: Dasun Nirmitha Date: Wed, 28 Apr 2021 21:44:19 +0530 Subject: [PATCH 01/28] Create IgnoringPatternMetacharactersUnitTest.java BAEL-4881 Understanding the Pattern.quote method --- ...IgnoringPatternMetacharactersUnitTest.java | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java diff --git a/core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java b/core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java new file mode 100644 index 0000000000..47c5089248 --- /dev/null +++ b/core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java @@ -0,0 +1,54 @@ +package com.baeldung.ignore.pattern.metacharacters; + +import static org.junit.Assert.assertEquals; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.junit.Test; + +public class IgnoringPatternMetacharactersUnitTest { + private static final String dollarValues = "$100.25, $100.50, $150.50, $100.50, $100.75"; + private static final String patternStr = "$100.50"; + + @Test + public void givenPatternStringHasMetacharacters_whenPatternMatchedWithoutEscapingMetacharacters_thenNoMatchesFound() { + Pattern pattern = Pattern.compile(patternStr); + Matcher matcher = pattern.matcher(dollarValues); + + int matches = 0; + while (matcher.find()) { + matches++; + } + + assertEquals(0, matches); + } + + @Test + public void givenPatternStringHasMetacharacters_whenPatternCompiledUsingManuallyMetaEscapedPattern_thenMatchingSuccessful() { + String metaEscapedPatternStr = "\\Q" + patternStr + "\\E"; + Pattern pattern = Pattern.compile(metaEscapedPatternStr); + Matcher matcher = pattern.matcher(dollarValues); + + int matches = 0; + while (matcher.find()) { + matches++; + } + + assertEquals(2, matches); + } + + @Test + public void givenPatternStringHasMetacharacters_whenPatternCompiledUsingLiteralPatternFromQuote_thenMatchingSuccessful() { + String literalPatternStr = Pattern.quote(patternStr); + Pattern pattern = Pattern.compile(literalPatternStr); + Matcher matcher = pattern.matcher(dollarValues); + + int matches = 0; + while (matcher.find()) { + matches++; + } + + assertEquals(2, matches); + } +} From 76e45f3b084b787798d502b32f982fe26a4a8495 Mon Sep 17 00:00:00 2001 From: Dasun Nirmitha Date: Mon, 10 May 2021 14:54:53 +0530 Subject: [PATCH 02/28] Update IgnoringPatternMetacharactersUnitTest.java Implemented improvements suggested by Editor. --- .../IgnoringPatternMetacharactersUnitTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java b/core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java index 47c5089248..921876c0d5 100644 --- a/core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java +++ b/core-java-modules/core-java-regex/src/test/java/com/baeldung/ignore/pattern/metacharacters/IgnoringPatternMetacharactersUnitTest.java @@ -8,13 +8,13 @@ import java.util.regex.Pattern; import org.junit.Test; public class IgnoringPatternMetacharactersUnitTest { - private static final String dollarValues = "$100.25, $100.50, $150.50, $100.50, $100.75"; + private static final String dollarAmounts = "$100.25, $100.50, $150.50, $100.50, $100.75"; private static final String patternStr = "$100.50"; @Test public void givenPatternStringHasMetacharacters_whenPatternMatchedWithoutEscapingMetacharacters_thenNoMatchesFound() { Pattern pattern = Pattern.compile(patternStr); - Matcher matcher = pattern.matcher(dollarValues); + Matcher matcher = pattern.matcher(dollarAmounts); int matches = 0; while (matcher.find()) { @@ -28,7 +28,7 @@ public class IgnoringPatternMetacharactersUnitTest { public void givenPatternStringHasMetacharacters_whenPatternCompiledUsingManuallyMetaEscapedPattern_thenMatchingSuccessful() { String metaEscapedPatternStr = "\\Q" + patternStr + "\\E"; Pattern pattern = Pattern.compile(metaEscapedPatternStr); - Matcher matcher = pattern.matcher(dollarValues); + Matcher matcher = pattern.matcher(dollarAmounts); int matches = 0; while (matcher.find()) { @@ -42,7 +42,7 @@ public class IgnoringPatternMetacharactersUnitTest { public void givenPatternStringHasMetacharacters_whenPatternCompiledUsingLiteralPatternFromQuote_thenMatchingSuccessful() { String literalPatternStr = Pattern.quote(patternStr); Pattern pattern = Pattern.compile(literalPatternStr); - Matcher matcher = pattern.matcher(dollarValues); + Matcher matcher = pattern.matcher(dollarAmounts); int matches = 0; while (matcher.find()) { From 55e113fe328d841aeae96c5bd3764982b064a2d4 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Mon, 17 May 2021 20:21:04 +0530 Subject: [PATCH 03/28] JAVA-5223: Fix formatting of POMs (Others) --- core-java-modules/core-java-9-jigsaw/pom.xml | 2 +- core-java-modules/core-java-9-streams/pom.xml | 4 ++-- jws/pom.xml | 7 +++--- libraries-4/pom.xml | 4 ++-- libraries-5/pom.xml | 4 ++-- libraries-6/pom.xml | 8 +++---- libraries/pom.xml | 8 ++++--- static-analysis/pom.xml | 5 ++-- stripe/pom.xml | 7 +++--- structurizr/pom.xml | 5 ++-- struts-2/pom.xml | 5 ++-- tensorflow-java/pom.xml | 4 ++-- twilio/pom.xml | 7 +++--- twitter4j/pom.xml | 7 +++--- vaadin/pom.xml | 10 ++++---- vavr-2/pom.xml | 15 ++++++------ vavr/pom.xml | 5 ++-- vertx-and-rxjava/pom.xml | 5 ++-- vertx/pom.xml | 12 ++++++---- video-tutorials/jackson-annotations/pom.xml | 24 +++---------------- video-tutorials/pom.xml | 8 +++---- vraptor/pom.xml | 18 +++----------- webrtc/pom.xml | 6 ++--- wicket/pom.xml | 6 ++--- wildfly/pom.xml | 5 ++-- xml/pom.xml | 15 ++++-------- xstream/pom.xml | 5 ++-- 27 files changed, 92 insertions(+), 119 deletions(-) diff --git a/core-java-modules/core-java-9-jigsaw/pom.xml b/core-java-modules/core-java-9-jigsaw/pom.xml index 0797003174..a26a88f4b0 100644 --- a/core-java-modules/core-java-9-jigsaw/pom.xml +++ b/core-java-modules/core-java-9-jigsaw/pom.xml @@ -34,4 +34,4 @@ 1.9 - + \ No newline at end of file diff --git a/core-java-modules/core-java-9-streams/pom.xml b/core-java-modules/core-java-9-streams/pom.xml index e59cc347c7..aeaf2c7f57 100644 --- a/core-java-modules/core-java-9-streams/pom.xml +++ b/core-java-modules/core-java-9-streams/pom.xml @@ -7,7 +7,7 @@ 0.1.0-SNAPSHOT core-java-9-streams jar - + com.baeldung.core-java-modules core-java-modules @@ -25,4 +25,4 @@ - + \ No newline at end of file diff --git a/jws/pom.xml b/jws/pom.xml index be42798fd1..3d2f67c691 100644 --- a/jws/pom.xml +++ b/jws/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 com.example jws @@ -66,4 +67,4 @@ 3.0.2 - + \ No newline at end of file diff --git a/libraries-4/pom.xml b/libraries-4/pom.xml index decd467de9..756bfbd3a8 100644 --- a/libraries-4/pom.xml +++ b/libraries-4/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 libraries-4 diff --git a/libraries-5/pom.xml b/libraries-5/pom.xml index ff6c208f5f..a3ca204995 100644 --- a/libraries-5/pom.xml +++ b/libraries-5/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 libraries-5 diff --git a/libraries-6/pom.xml b/libraries-6/pom.xml index 6db3b1b77b..289597adc9 100644 --- a/libraries-6/pom.xml +++ b/libraries-6/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 libraries-6 @@ -112,12 +112,12 @@ renjin-script-engine ${renjin.version} - + com.googlecode.libphonenumber libphonenumber ${libphonenumber.version} - + diff --git a/libraries/pom.xml b/libraries/pom.xml index 13f91fddd0..40cc1b4671 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 libraries libraries @@ -335,7 +336,8 @@ benchmarks - + org.openjdk.jmh.Main diff --git a/static-analysis/pom.xml b/static-analysis/pom.xml index 87e5f55977..577440117c 100644 --- a/static-analysis/pom.xml +++ b/static-analysis/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 static-analysis 1.0-SNAPSHOT diff --git a/stripe/pom.xml b/stripe/pom.xml index 48505c9e4e..cfd281b4a8 100644 --- a/stripe/pom.xml +++ b/stripe/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 com.baeldung.stripe stripe @@ -40,4 +41,4 @@ 4.2.0 - + \ No newline at end of file diff --git a/structurizr/pom.xml b/structurizr/pom.xml index b8efba0937..85e3fc87d1 100644 --- a/structurizr/pom.xml +++ b/structurizr/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 structurizr structurizr diff --git a/struts-2/pom.xml b/struts-2/pom.xml index 3211ad7253..87663cf545 100644 --- a/struts-2/pom.xml +++ b/struts-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 struts-2 0.0.1-SNAPSHOT diff --git a/tensorflow-java/pom.xml b/tensorflow-java/pom.xml index 379a901925..2ac4d28a37 100644 --- a/tensorflow-java/pom.xml +++ b/tensorflow-java/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 tensorflow-java 1.0-SNAPSHOT diff --git a/twilio/pom.xml b/twilio/pom.xml index 76ad5faafb..327242749b 100644 --- a/twilio/pom.xml +++ b/twilio/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 twilio 1.0-SNAPSHOT @@ -24,4 +25,4 @@ 7.20.0 - + \ No newline at end of file diff --git a/twitter4j/pom.xml b/twitter4j/pom.xml index e2579bf73e..3e9bcd550a 100644 --- a/twitter4j/pom.xml +++ b/twitter4j/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 twitter4j twitter4j @@ -24,4 +25,4 @@ 4.0.6 - + \ No newline at end of file diff --git a/vaadin/pom.xml b/vaadin/pom.xml index 4814e70ae3..9025205527 100644 --- a/vaadin/pom.xml +++ b/vaadin/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 org.test vaadin @@ -107,7 +108,8 @@ - + org.eclipse.jetty jetty-maven-plugin @@ -189,4 +191,4 @@ 3.0.0 - + \ No newline at end of file diff --git a/vavr-2/pom.xml b/vavr-2/pom.xml index d20dd9afef..f3640d7c6e 100644 --- a/vavr-2/pom.xml +++ b/vavr-2/pom.xml @@ -1,17 +1,17 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + vavr-2 + vavr-2 + jar + parent-modules com.baeldung 1.0.0-SNAPSHOT - 4.0.0 - - vavr-2 - vavr-2 - jar @@ -24,4 +24,5 @@ 0.9.1 + \ No newline at end of file diff --git a/vavr/pom.xml b/vavr/pom.xml index 16097af848..1604ecc06e 100644 --- a/vavr/pom.xml +++ b/vavr/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 vavr 1.0 diff --git a/vertx-and-rxjava/pom.xml b/vertx-and-rxjava/pom.xml index 20b022a773..fb04ba784c 100644 --- a/vertx-and-rxjava/pom.xml +++ b/vertx-and-rxjava/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 vertx-and-rxjava vertx-and-rxjava diff --git a/vertx/pom.xml b/vertx/pom.xml index 81ede1ba0b..9a22e2dd72 100644 --- a/vertx/pom.xml +++ b/vertx/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 vertx 1.0-SNAPSHOT @@ -46,14 +47,15 @@ - + io.vertx.core.Starter com.baeldung.SimpleServerVerticle - + ${project.build.directory}/${project.artifactId}-${project.version}-app.jar @@ -67,4 +69,4 @@ 3.2.1 - + \ No newline at end of file diff --git a/video-tutorials/jackson-annotations/pom.xml b/video-tutorials/jackson-annotations/pom.xml index f396baf80b..827715fe5f 100644 --- a/video-tutorials/jackson-annotations/pom.xml +++ b/video-tutorials/jackson-annotations/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 jackson-annotations 1.0.0-SNAPSHOT @@ -13,73 +14,60 @@ - commons-io commons-io ${commons-io.version} - com.fasterxml.jackson.dataformat jackson-dataformat-xml ${jackson.version} - org.apache.commons commons-collections4 ${commons-collections4.version} - org.apache.commons commons-lang3 ${commons-lang3.version} - - - com.fasterxml.jackson.core jackson-databind ${jackson.version} - com.fasterxml.jackson.datatype jackson-datatype-jsr310 ${jackson.version} - com.fasterxml.jackson.datatype jackson-datatype-joda ${jackson.version} - com.fasterxml.jackson.module jackson-module-jsonSchema ${jackson.version} - joda-time joda-time ${joda-time.version} - com.google.code.gson gson ${gson.version} - io.rest-assured @@ -93,7 +81,6 @@ - io.rest-assured @@ -101,28 +88,24 @@ ${rest-assured-json-schema-validator.version} test - io.rest-assured json-path ${json-path.version} test - com.github.fge json-schema-validator ${json-schema-validator.version} test - org.assertj assertj-core ${assertj-core.version} test - @@ -140,7 +123,6 @@ 2.9.6 2.8.0 4.1 - 3.0.1 3.0.0 diff --git a/video-tutorials/pom.xml b/video-tutorials/pom.xml index 53ff0c6d89..52c4f2af2a 100644 --- a/video-tutorials/pom.xml +++ b/video-tutorials/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 video-tutorials 1.0.0-SNAPSHOT @@ -18,5 +19,4 @@ jackson-annotations - - + \ No newline at end of file diff --git a/vraptor/pom.xml b/vraptor/pom.xml index 9956305e98..ab78c0d97a 100644 --- a/vraptor/pom.xml +++ b/vraptor/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 vraptor 1.0.0 @@ -20,7 +21,6 @@ vraptor ${vraptor.version} - org.jboss.weld.servlet weld-servlet-core @@ -32,7 +32,6 @@ - org.jboss.weld weld-core-impl @@ -44,69 +43,58 @@ - javax.el el-api ${el.version} provided - org.hibernate hibernate-validator-cdi ${hibernate-validator.version} - javax.servlet jstl ${jstl.version} - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - org.slf4j slf4j-log4j12 ${slf4j-log4j12.version} - br.com.caelum.vraptor vraptor-freemarker ${vraptor-freemarker.version} - br.com.caelum.vraptor vraptor-hibernate ${vraptor-hibernate.version} - mysql mysql-connector-java ${mysql-connector.version} - org.mindrot jbcrypt ${jbcrypt.version} - org.freemarker freemarker ${freemarker.version} - diff --git a/webrtc/pom.xml b/webrtc/pom.xml index 191ff11dd6..9b238d75f2 100644 --- a/webrtc/pom.xml +++ b/webrtc/pom.xml @@ -1,10 +1,8 @@ - 4.0.0 - webrtc 0.0.1 @@ -31,4 +29,4 @@ - + \ No newline at end of file diff --git a/wicket/pom.xml b/wicket/pom.xml index 68bc2f3e6b..55baf64032 100644 --- a/wicket/pom.xml +++ b/wicket/pom.xml @@ -1,6 +1,5 @@ - 4.0.0 @@ -23,7 +22,6 @@ wicket-core ${wicket.version} - org.eclipse.jetty.aggregate @@ -89,4 +87,4 @@ 2.6 - + \ No newline at end of file diff --git a/wildfly/pom.xml b/wildfly/pom.xml index 6d823bb4c9..c5d9bce37a 100644 --- a/wildfly/pom.xml +++ b/wildfly/pom.xml @@ -1,6 +1,5 @@ - 4.0.0 @@ -76,4 +75,4 @@ - + \ No newline at end of file diff --git a/xml/pom.xml b/xml/pom.xml index d2fa5c0727..b4c78b514d 100644 --- a/xml/pom.xml +++ b/xml/pom.xml @@ -1,6 +1,5 @@ - 4.0.0 @@ -88,31 +87,26 @@ commons-io ${commons-io.version} - org.apache.commons commons-collections4 ${commons-collections4.version} - org.apache.commons commons-lang3 ${commons-lang3.version} - org.jibx jibx-run ${jibx-version} - commons-lang commons-lang ${commons-lang.version} - org.junit.jupiter junit-jupiter @@ -270,7 +264,6 @@ - bindGen @@ -327,7 +320,8 @@ - + maven-assembly-plugin ${project.basedir} @@ -378,10 +372,9 @@ 0.9.6 2.4 - 1.3.1 3.8.0 - + \ No newline at end of file diff --git a/xstream/pom.xml b/xstream/pom.xml index 618df1a7c2..c4104d29c4 100644 --- a/xstream/pom.xml +++ b/xstream/pom.xml @@ -1,6 +1,5 @@ - 4.0.0 @@ -35,4 +34,4 @@ 1.3.8 - + \ No newline at end of file From 4b1f2c50a521114fbe1563da8ada2682e27de521 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Mon, 17 May 2021 20:22:27 +0530 Subject: [PATCH 04/28] JAVA-5223: Fix formatting of POMs (Spring Security Modules) --- spring-security-modules/pom.xml | 9 +++-- .../spring-5-security-cognito/pom.xml | 6 +-- .../spring-5-security-oauth/pom.xml | 7 ++-- .../spring-5-security/pom.xml | 7 ++-- spring-security-modules/spring-ldap/pom.xml | 11 ++--- .../spring-security-acl/pom.xml | 7 ++-- .../spring-security-auth0/pom.xml | 34 ++++++++-------- .../cache-control/pom.xml | 6 +-- .../spring-security-config/cors/pom.xml | 8 ++-- .../spring-security-config/pom.xml | 7 ++-- .../spring-security-core/pom.xml | 5 ++- .../spring-security-ldap/pom.xml | 13 +++--- .../spring-security-legacy-oidc/pom.xml | 6 +-- .../spring-security-oauth2-sso/pom.xml | 7 ++-- .../spring-security-sso-auth-server/pom.xml | 7 ++-- .../spring-security-sso-kerberos/pom.xml | 8 ++-- .../spring-security-sso-ui-2/pom.xml | 13 ++---- .../spring-security-sso-ui/pom.xml | 14 ++----- .../spring-security-oidc/pom.xml | 2 +- .../spring-security-okta/pom.xml | 10 +++-- .../spring-security-saml/pom.xml | 4 +- .../server/pom.xml | 8 ++-- .../spring-security-web-boot-1/pom.xml | 9 ++--- .../spring-security-web-boot-2/pom.xml | 18 ++++----- .../spring-security-web-boot-3/pom.xml | 6 +-- .../spring-security-web-digest-auth/pom.xml | 30 ++------------ .../spring-security-web-login/pom.xml | 21 ++-------- .../spring-security-web-mvc-custom/pom.xml | 28 ++----------- .../spring-security-web-mvc/pom.xml | 13 ++---- .../pom.xml | 40 ++++--------------- .../spring-security-web-react/pom.xml | 29 +++----------- .../pom.xml | 35 ++-------------- .../spring-security-web-rest-custom/pom.xml | 33 ++------------- .../spring-security-web-rest/pom.xml | 37 +++-------------- .../spring-security-web-sockets/pom.xml | 14 ++----- .../spring-security-web-thymeleaf/pom.xml | 7 ++-- .../spring-security-web-x509/pom.xml | 7 ++-- .../pom.xml | 7 ++-- .../pom.xml | 7 ++-- .../spring-session/pom.xml | 7 ++-- .../spring-session-jdbc/pom.xml | 4 +- .../spring-session-mongodb/pom.xml | 8 +--- .../spring-session-redis/pom.xml | 7 ++-- .../spring-social-login/pom.xml | 22 ++-------- 44 files changed, 182 insertions(+), 406 deletions(-) diff --git a/spring-security-modules/pom.xml b/spring-security-modules/pom.xml index bb2702fc9d..0f4ba872ba 100644 --- a/spring-security-modules/pom.xml +++ b/spring-security-modules/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-modules 0.0.1-SNAPSHOT @@ -37,7 +38,7 @@ spring-security-web-mvc-custom spring-security-web-mvc spring-security-web-persisted-remember-me - spring-security-web-react + spring-security-web-react spring-security-web-rest-basic-auth spring-security-web-rest-custom spring-security-web-rest @@ -48,4 +49,4 @@ spring-social-login - + \ No newline at end of file diff --git a/spring-security-modules/spring-5-security-cognito/pom.xml b/spring-security-modules/spring-5-security-cognito/pom.xml index 877dbd52fa..4da8b2fae5 100644 --- a/spring-security-modules/spring-5-security-cognito/pom.xml +++ b/spring-security-modules/spring-5-security-cognito/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-5-security-cognito @@ -32,7 +33,6 @@ org.thymeleaf.extras thymeleaf-extras-springsecurity5 - org.springframework.security @@ -62,4 +62,4 @@ com.baeldung.cognito.SpringCognitoApplication - + \ No newline at end of file diff --git a/spring-security-modules/spring-5-security-oauth/pom.xml b/spring-security-modules/spring-5-security-oauth/pom.xml index d31cf293a3..03e1880431 100644 --- a/spring-security-modules/spring-5-security-oauth/pom.xml +++ b/spring-security-modules/spring-5-security-oauth/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-5-security-oauth @@ -36,7 +37,6 @@ org.springframework.boot spring-boot-starter-jersey - org.springframework.security.oauth.boot @@ -51,7 +51,6 @@ org.springframework.security spring-security-oauth2-jose - org.springframework spring-test @@ -72,4 +71,4 @@ com.baeldung.oauth2.SpringOAuthApplication - + \ No newline at end of file diff --git a/spring-security-modules/spring-5-security/pom.xml b/spring-security-modules/spring-5-security/pom.xml index d009115c92..73b956d1e7 100644 --- a/spring-security-modules/spring-5-security/pom.xml +++ b/spring-security-modules/spring-5-security/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-5-security 0.0.1-SNAPSHOT @@ -76,4 +77,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-ldap/pom.xml b/spring-security-modules/spring-ldap/pom.xml index 60da7d4c0d..44f754673f 100644 --- a/spring-security-modules/spring-ldap/pom.xml +++ b/spring-security-modules/spring-ldap/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-ldap 0.1-SNAPSHOT @@ -14,7 +15,6 @@ - org.springframework.ldap spring-ldap-core @@ -26,13 +26,11 @@ - org.springframework spring-context ${spring-context.version} - org.springframework.ldap @@ -46,7 +44,6 @@ - org.apache.directory.server @@ -84,8 +81,6 @@ ${shared-ldap.version} test - - org.springframework.data diff --git a/spring-security-modules/spring-security-acl/pom.xml b/spring-security-modules/spring-security-acl/pom.xml index 5c04aaa9ca..7facc1b14b 100644 --- a/spring-security-modules/spring-security-acl/pom.xml +++ b/spring-security-modules/spring-security-acl/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-acl 0.0.1-SNAPSHOT @@ -58,4 +59,4 @@ 2.6.11 - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-auth0/pom.xml b/spring-security-modules/spring-security-auth0/pom.xml index 0bd879a40b..106a0db29f 100644 --- a/spring-security-modules/spring-security-auth0/pom.xml +++ b/spring-security-modules/spring-security-auth0/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-auth0 1.0-SNAPSHOT @@ -23,20 +24,20 @@ org.springframework.boot spring-boot-starter-security - - org.springframework.security - spring-security-core - - - org.springframework.security - spring-security-oauth2-resource-server - - - com.auth0 - mvc-auth-commons - ${mvc-auth-commons.version} - - + + org.springframework.security + spring-security-core + + + org.springframework.security + spring-security-oauth2-resource-server + + + com.auth0 + mvc-auth-commons + ${mvc-auth-commons.version} + + org.json json ${json.version} @@ -72,4 +73,5 @@ 20190722 1.2.0 + \ No newline at end of file diff --git a/spring-security-modules/spring-security-config/cache-control/pom.xml b/spring-security-modules/spring-security-config/cache-control/pom.xml index 753307493d..b10d65615e 100644 --- a/spring-security-modules/spring-security-config/cache-control/pom.xml +++ b/spring-security-modules/spring-security-config/cache-control/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 cache-control 1.0-SNAPSHOT @@ -26,7 +27,6 @@ org.springframework.boot spring-boot-starter-security - org.springframework.boot spring-boot-starter-test diff --git a/spring-security-modules/spring-security-config/cors/pom.xml b/spring-security-modules/spring-security-config/cors/pom.xml index 175b21a77d..2b8efb9add 100644 --- a/spring-security-modules/spring-security-config/cors/pom.xml +++ b/spring-security-modules/spring-security-config/cors/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 cors cors @@ -35,7 +36,6 @@ org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-test @@ -57,4 +57,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-config/pom.xml b/spring-security-modules/spring-security-config/pom.xml index 2b6b6b6b4e..860a602aeb 100644 --- a/spring-security-modules/spring-security-config/pom.xml +++ b/spring-security-modules/spring-security-config/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-config 0.0.1-SNAPSHOT @@ -19,4 +20,4 @@ cors - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-core/pom.xml b/spring-security-modules/spring-security-core/pom.xml index 9f1e7cda29..0eb70c0853 100644 --- a/spring-security-modules/spring-security-core/pom.xml +++ b/spring-security-modules/spring-security-core/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-security-core @@ -99,4 +100,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-ldap/pom.xml b/spring-security-modules/spring-security-ldap/pom.xml index baed682186..3755c33125 100644 --- a/spring-security-modules/spring-security-ldap/pom.xml +++ b/spring-security-modules/spring-security-ldap/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-ldap 0.1-SNAPSHOT @@ -15,7 +16,6 @@ - org.springframework.boot @@ -33,24 +33,21 @@ org.springframework.boot spring-boot-starter-actuator - org.springframework.security spring-security-ldap - org.apache.directory.server apacheds-server-jndi ${apacheds.version} - - spring-security-mvc-ldap + spring-security-ldap src/main/resources @@ -63,4 +60,4 @@ 1.5.5 - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-legacy-oidc/pom.xml b/spring-security-modules/spring-security-legacy-oidc/pom.xml index a4ead0f6e0..148b836137 100644 --- a/spring-security-modules/spring-security-legacy-oidc/pom.xml +++ b/spring-security-modules/spring-security-legacy-oidc/pom.xml @@ -24,24 +24,20 @@ org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-tomcat - org.springframework.security.oauth spring-security-oauth2 ${spring-security-oauth2.version} - org.springframework.security spring-security-jwt ${spring-security-jwt.version} - com.auth0 jwks-rsa @@ -55,4 +51,4 @@ 0.3.0 - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-oauth2-sso/pom.xml b/spring-security-modules/spring-security-oauth2-sso/pom.xml index a272ba5b50..c9f9274c98 100644 --- a/spring-security-modules/spring-security-oauth2-sso/pom.xml +++ b/spring-security-modules/spring-security-oauth2-sso/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 com.baeldung spring-security-oauth2-sso @@ -30,4 +31,4 @@ 2.0.0-M2 - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-auth-server/pom.xml b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-auth-server/pom.xml index 20a43eaf04..1a8d1b580f 100644 --- a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-auth-server/pom.xml +++ b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-auth-server/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-sso-auth-server spring-security-sso-auth-server @@ -24,4 +25,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-kerberos/pom.xml b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-kerberos/pom.xml index f17ca171a5..c18769df1e 100644 --- a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-kerberos/pom.xml +++ b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-kerberos/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-security-sso-kerberos @@ -91,9 +91,9 @@ - + - com.baeldung.intro.Application + com.baeldung.intro.Application \ No newline at end of file diff --git a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui-2/pom.xml b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui-2/pom.xml index 514dd0d0f7..cd510a972a 100644 --- a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui-2/pom.xml +++ b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-sso-ui-2 spring-security-sso-ui-2 @@ -13,33 +14,27 @@ - org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-security - org.springframework.security.oauth.boot spring-security-oauth2-autoconfigure ${oauth-auto.version} - org.springframework.boot spring-boot-starter-thymeleaf - org.thymeleaf.extras thymeleaf-extras-springsecurity5 - - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui/pom.xml b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui/pom.xml index 5076b1878b..ec2da615f4 100644 --- a/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui/pom.xml +++ b/spring-security-modules/spring-security-oauth2-sso/spring-security-sso-ui/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-sso-ui spring-security-sso-ui @@ -13,34 +14,27 @@ - org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-security - org.springframework.security.oauth.boot spring-security-oauth2-autoconfigure ${oauth-auto.version} - - org.springframework.boot spring-boot-starter-thymeleaf - org.thymeleaf.extras thymeleaf-extras-springsecurity5 - - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-oidc/pom.xml b/spring-security-modules/spring-security-oidc/pom.xml index b9a4b340a3..2a413b1d27 100644 --- a/spring-security-modules/spring-security-oidc/pom.xml +++ b/spring-security-modules/spring-security-oidc/pom.xml @@ -26,4 +26,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-okta/pom.xml b/spring-security-modules/spring-security-okta/pom.xml index c5ff9013b5..98b8abedb4 100644 --- a/spring-security-modules/spring-security-okta/pom.xml +++ b/spring-security-modules/spring-security-okta/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-okta 1.0-SNAPSHOT @@ -55,8 +56,9 @@ - + 1.4.0 - + + \ No newline at end of file diff --git a/spring-security-modules/spring-security-saml/pom.xml b/spring-security-modules/spring-security-saml/pom.xml index 561582045a..8a9b418374 100644 --- a/spring-security-modules/spring-security-saml/pom.xml +++ b/spring-security-modules/spring-security-saml/pom.xml @@ -14,6 +14,7 @@ 0.0.1-SNAPSHOT ../../parent-boot-2 + Shibboleth @@ -70,4 +71,5 @@ 1.0.10.RELEASE - + + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-angular/server/pom.xml b/spring-security-modules/spring-security-web-angular/server/pom.xml index 07d5d44e8d..2e9ff9969d 100644 --- a/spring-security-modules/spring-security-web-angular/server/pom.xml +++ b/spring-security-modules/spring-security-web-angular/server/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 server 0.0.1-SNAPSHOT @@ -40,7 +41,6 @@ org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-test @@ -62,4 +62,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-boot-1/pom.xml b/spring-security-modules/spring-security-web-boot-1/pom.xml index 1f80b62765..a376a49b4c 100644 --- a/spring-security-modules/spring-security-web-boot-1/pom.xml +++ b/spring-security-modules/spring-security-web-boot-1/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-security-web-boot-1 0.0.1-SNAPSHOT @@ -223,10 +223,9 @@ com.baeldung.roles.custom.Application - + - 1.1.2 1.6.1 2.6.11 diff --git a/spring-security-modules/spring-security-web-boot-2/pom.xml b/spring-security-modules/spring-security-web-boot-2/pom.xml index ca357509a3..ade644741d 100644 --- a/spring-security-modules/spring-security-web-boot-2/pom.xml +++ b/spring-security-modules/spring-security-web-boot-2/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-security-web-boot-2 0.0.1-SNAPSHOT @@ -184,7 +184,6 @@ - entryPoints @@ -222,19 +221,18 @@ - + com.baeldung.multiplelogin.MultipleLoginApplication - + - + - 1.1.2 1.6.1 2.6.11 - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-boot-3/pom.xml b/spring-security-modules/spring-security-web-boot-3/pom.xml index a6e2b48d75..1fff259c16 100644 --- a/spring-security-modules/spring-security-web-boot-3/pom.xml +++ b/spring-security-modules/spring-security-web-boot-3/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-security-web-boot-3 0.0.1-SNAPSHOT @@ -27,4 +27,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-digest-auth/pom.xml b/spring-security-modules/spring-security-web-digest-auth/pom.xml index 39433c1295..710a3dd3b6 100644 --- a/spring-security-modules/spring-security-web-digest-auth/pom.xml +++ b/spring-security-modules/spring-security-web-digest-auth/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-security-web-digest-auth @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -28,9 +27,7 @@ spring-security-config ${org.springframework.security.version} - - org.springframework spring-core @@ -72,7 +69,6 @@ spring-expression ${spring.version} - org.springframework spring-web @@ -83,37 +79,30 @@ spring-webmvc ${spring.version} - org.springframework spring-oxm ${spring.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - - com.google.guava guava ${guava.version} - org.apache.httpcomponents httpcore @@ -125,7 +114,6 @@ - org.apache.httpcomponents httpclient @@ -137,35 +125,28 @@ - - org.springframework spring-test ${spring.version} test - - - spring-security-mvc-digest-auth + spring-security-web-digest-auth src/main/resources true - - org.apache.maven.plugins maven-war-plugin ${maven-war-plugin.version} - org.codehaus.cargo cargo-maven2-plugin @@ -186,21 +167,16 @@ - - 4.2.6.RELEASE - 19.0 - 4.4.5 4.5.2 - 1.6.1 diff --git a/spring-security-modules/spring-security-web-login/pom.xml b/spring-security-modules/spring-security-web-login/pom.xml index 2b64d157d3..ac5393c1a0 100644 --- a/spring-security-modules/spring-security-web-login/pom.xml +++ b/spring-security-modules/spring-security-web-login/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-security-web-login @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -33,9 +32,7 @@ spring-security-taglibs ${spring-security.version} - - org.springframework spring-core @@ -77,7 +74,6 @@ spring-expression ${spring.version} - org.springframework spring-web @@ -88,25 +84,20 @@ spring-webmvc ${spring.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - - org.springframework spring-test @@ -119,20 +110,17 @@ ${spring-security.version} test - - spring-security-mvc-login + spring-security-web-login src/main/resources true - - org.apache.maven.plugins maven-war-plugin @@ -147,7 +135,6 @@ - org.codehaus.cargo cargo-maven2-plugin @@ -168,9 +155,7 @@ - - diff --git a/spring-security-modules/spring-security-web-mvc-custom/pom.xml b/spring-security-modules/spring-security-web-mvc-custom/pom.xml index bd4a800bc5..539f83d7b8 100644 --- a/spring-security-modules/spring-security-web-mvc-custom/pom.xml +++ b/spring-security-modules/spring-security-web-mvc-custom/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-security-web-mvc-custom @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -33,9 +32,7 @@ spring-security-taglibs ${spring-security.version} - - org.springframework spring-core @@ -77,7 +74,6 @@ spring-expression ${spring.version} - org.springframework spring-web @@ -88,59 +84,48 @@ spring-webmvc ${spring.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - - - com.fasterxml.jackson.core jackson-databind ${jackson.version} - org.apache.commons commons-lang3 ${commons-lang3.version} - com.google.guava guava ${guava.version} - - org.springframework spring-test ${spring.version} test - org.springframework.security spring-security-test @@ -150,22 +135,19 @@ - spring-security-mvc-custom + spring-security-web-mvc-custom src/main/resources true - - org.apache.maven.plugins maven-war-plugin ${maven-war-plugin.version} - org.codehaus.cargo cargo-maven2-plugin @@ -186,18 +168,14 @@ - - 19.0 - 1.6.1 - \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-mvc/pom.xml b/spring-security-modules/spring-security-web-mvc/pom.xml index b1e94b2db3..505826d1a2 100644 --- a/spring-security-modules/spring-security-web-mvc/pom.xml +++ b/spring-security-modules/spring-security-web-mvc/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-security-web-mvc 0.1-SNAPSHOT @@ -16,9 +16,7 @@ - - org.springframework.boot spring-boot-starter-security @@ -27,7 +25,6 @@ org.springframework.security spring-security-taglibs - org.springframework.boot @@ -42,19 +39,16 @@ org.springframework.boot spring-boot-starter-tomcat - javax.servlet jstl runtime - io.dropwizard.metrics metrics-core - org.springframework.boot @@ -67,7 +61,6 @@ ${javax.version} - @@ -86,4 +79,4 @@ 4.0.1 - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-persisted-remember-me/pom.xml b/spring-security-modules/spring-security-web-persisted-remember-me/pom.xml index 25c5ddd9d0..66a2b3866b 100644 --- a/spring-security-modules/spring-security-web-persisted-remember-me/pom.xml +++ b/spring-security-modules/spring-security-web-persisted-remember-me/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-security-web-persisted-remember-me @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -38,9 +37,7 @@ spring-orm ${spring.version} - - org.springframework spring-core @@ -82,7 +79,6 @@ spring-expression ${spring.version} - org.springframework spring-web @@ -93,81 +89,66 @@ spring-webmvc ${spring.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - - com.h2database h2 ${h2.version} - org.postgresql postgresql ${postgresql.version} runtime - - com.google.guava guava ${guava.version} - - org.springframework.boot - spring-boot-starter-test - ${spring-boot.version} - test - - + org.springframework.boot + spring-boot-starter-test + ${spring-boot.version} + test + - - - spring-security-mvc-persisted-remember-me + spring-security-web-persisted-remember-me src/main/resources true - - org.apache.maven.plugins maven-war-plugin ${maven-war-plugin.version} - org.codehaus.cargo cargo-maven2-plugin @@ -188,21 +169,16 @@ - - 4.2.6.RELEASE - 9.4.1212 - 19.0 - 1.6.1 1.5.10.RELEASE diff --git a/spring-security-modules/spring-security-web-react/pom.xml b/spring-security-modules/spring-security-web-react/pom.xml index 663c7d76c3..e8f74413ff 100644 --- a/spring-security-modules/spring-security-web-react/pom.xml +++ b/spring-security-modules/spring-security-web-react/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-web-react 0.1-SNAPSHOT @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -33,9 +32,7 @@ spring-security-taglibs ${spring-security.version} - - org.springframework spring-core @@ -56,7 +53,6 @@ spring-aop ${spring.version} - org.springframework spring-web @@ -67,9 +63,7 @@ spring-webmvc ${spring.version} - - javax.servlet javax.servlet-api @@ -82,7 +76,6 @@ ${jstl.version} runtime - org.springframework.boot @@ -90,20 +83,17 @@ 1.5.10.RELEASE test - - spring-security-react + spring-security-web-react src/main/resources true - - org.apache.maven.plugins maven-war-plugin @@ -118,7 +108,6 @@ - com.github.eirslett frontend-maven-plugin @@ -152,27 +141,22 @@ - org.eclipse.jetty jetty-maven-plugin 9.4.11.v20180605 - - default-first - com.github.eirslett frontend-maven-plugin - install node and npm @@ -193,13 +177,11 @@ default-second - com.github.eirslett frontend-maven-plugin - install node and npm @@ -223,14 +205,13 @@ 19.0 - 2.7 1.6 9.4.11.v20180605 - v8.11.3 6.1.0 + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-rest-basic-auth/pom.xml b/spring-security-modules/spring-security-web-rest-basic-auth/pom.xml index 0dc0b9cc42..de28df1933 100644 --- a/spring-security-modules/spring-security-web-rest-basic-auth/pom.xml +++ b/spring-security-modules/spring-security-web-rest-basic-auth/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 spring-security-web-rest-basic-auth @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -28,9 +27,7 @@ spring-security-config ${spring-security.version} - - org.springframework spring-core @@ -72,7 +69,6 @@ spring-expression ${spring.version} - org.springframework spring-web @@ -83,23 +79,18 @@ spring-webmvc ${spring.version} - org.springframework spring-oxm ${spring.version} - - com.fasterxml.jackson.core jackson-databind ${jackson.version} - - @@ -111,7 +102,6 @@ - org.apache.httpcomponents httpcore @@ -123,7 +113,6 @@ - org.apache.httpcomponents httpclient @@ -135,59 +124,48 @@ - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - - com.google.guava guava ${guava.version} - - org.springframework spring-test ${spring.version} test - - spring-security-rest-basic-auth + spring-security-web-rest-basic-auth src/main/resources true - - org.apache.maven.plugins maven-war-plugin ${maven-war-plugin.version} - org.codehaus.cargo cargo-maven2-plugin @@ -208,9 +186,7 @@ - - @@ -238,7 +214,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -262,21 +237,17 @@ - - 4.4.11 4.5.8 - 19.0 - 1.6.1 diff --git a/spring-security-modules/spring-security-web-rest-custom/pom.xml b/spring-security-modules/spring-security-web-rest-custom/pom.xml index 0ba7f95de7..85e50412ad 100644 --- a/spring-security-modules/spring-security-web-rest-custom/pom.xml +++ b/spring-security-modules/spring-security-web-rest-custom/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-web-rest-custom 0.1-SNAPSHOT @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -34,9 +33,7 @@ org.thymeleaf thymeleaf-spring5 - - org.springframework spring-core @@ -65,7 +62,6 @@ org.springframework spring-expression - org.springframework spring-web @@ -74,53 +70,41 @@ org.springframework spring-webmvc - org.springframework spring-oxm - commons-logging commons-logging ${commons-logging.version} - - com.fasterxml.jackson.core jackson-databind - - javax.servlet javax.servlet-api provided - javax.servlet jstl runtime - - org.apache.httpcomponents httpcore - org.apache.httpcomponents httpclient - - com.google.guava guava @@ -131,32 +115,27 @@ commons-lang3 ${commons-lang3.version} - - org.hamcrest hamcrest test - org.mockito mockito-core test - - spring-security-rest-custom + spring-security-web-rest-custom src/main/resources true - org.springframework.boot @@ -172,7 +151,6 @@ false - org.codehaus.cargo cargo-maven2-plugin @@ -193,16 +171,13 @@ - - 19.0 1.2 - 1.6.1 diff --git a/spring-security-modules/spring-security-web-rest/pom.xml b/spring-security-modules/spring-security-web-rest/pom.xml index 2330243aa6..c3f2c09e9e 100644 --- a/spring-security-modules/spring-security-web-rest/pom.xml +++ b/spring-security-modules/spring-security-web-rest/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-web-rest 0.1-SNAPSHOT @@ -15,9 +16,7 @@ - - org.springframework.security spring-security-web @@ -28,9 +27,7 @@ spring-security-config ${spring-security.version} - - org.springframework spring-core @@ -72,7 +69,6 @@ spring-expression ${spring.version} - org.springframework spring-web @@ -83,37 +79,30 @@ spring-webmvc ${spring.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - javax.validation validation-api ${javax.validation.version} - - com.fasterxml.jackson.core jackson-databind ${jackson.version} - com.google.guava @@ -125,7 +114,6 @@ commons-lang3 ${commons-lang3.version} - org.springframework @@ -133,15 +121,12 @@ ${spring.version} test - org.springframework.security spring-security-test ${spring-security.version} test - - com.jayway.restassured rest-assured @@ -154,37 +139,32 @@ - io.springfox springfox-swagger2 ${springfox-swagger.version} - io.springfox springfox-swagger-ui ${springfox-swagger.version} - commons-fileupload commons-fileupload ${commons-fileupload.version} - - spring-security-rest + spring-security-web-rest src/main/resources true - org.codehaus.cargo @@ -205,9 +185,7 @@ - - @@ -235,7 +213,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -267,18 +244,14 @@ 1.1.0.Final - 26.0-jre - 2.9.0 - 2.9.2 - 1.6.1 - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-sockets/pom.xml b/spring-security-modules/spring-security-web-sockets/pom.xml index 4aecf296b4..e822b6beda 100644 --- a/spring-security-modules/spring-security-web-sockets/pom.xml +++ b/spring-security-modules/spring-security-web-sockets/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 com.baeldung.springsecuredsockets spring-security-web-sockets @@ -50,7 +51,6 @@ - org.springframework.security @@ -62,7 +62,6 @@ spring-security-config ${spring-security.version} - org.springframework.data @@ -79,7 +78,6 @@ h2 ${h2.version} - org.springframework @@ -96,7 +94,6 @@ spring-security-messaging ${spring-security.version} - org.slf4j @@ -108,7 +105,6 @@ logback-classic ${logback-classic.version} - javax.servlet @@ -130,7 +126,6 @@ jstl ${jstl.version} - com.fasterxml.jackson.core @@ -147,7 +142,6 @@ jackson-annotations ${jackson.version} - org.springframework.boot @@ -158,7 +152,7 @@ - spring-security-mvc-socket + spring-security-web-sockets org.apache.tomcat.maven diff --git a/spring-security-modules/spring-security-web-thymeleaf/pom.xml b/spring-security-modules/spring-security-web-thymeleaf/pom.xml index 196ec0b86f..8e6e0856af 100644 --- a/spring-security-modules/spring-security-web-thymeleaf/pom.xml +++ b/spring-security-modules/spring-security-web-thymeleaf/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-web-thymeleaf 0.0.1-SNAPSHOT @@ -54,4 +55,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-x509/pom.xml b/spring-security-modules/spring-security-web-x509/pom.xml index 045c0aba6a..5282ab7d83 100644 --- a/spring-security-modules/spring-security-web-x509/pom.xml +++ b/spring-security-modules/spring-security-web-x509/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-web-x509 0.0.1-SNAPSHOT @@ -34,4 +35,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-x509/spring-security-web-x509-basic-auth/pom.xml b/spring-security-modules/spring-security-web-x509/spring-security-web-x509-basic-auth/pom.xml index 917ffa6b0e..9598843b63 100644 --- a/spring-security-modules/spring-security-web-x509/spring-security-web-x509-basic-auth/pom.xml +++ b/spring-security-modules/spring-security-web-x509/spring-security-web-x509-basic-auth/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-web-x509-basic-auth 0.0.1-SNAPSHOT @@ -35,4 +36,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-x509/spring-security-web-x509-client-auth/pom.xml b/spring-security-modules/spring-security-web-x509/spring-security-web-x509-client-auth/pom.xml index fdbc90c0f6..f310ab1e5c 100644 --- a/spring-security-modules/spring-security-web-x509/spring-security-web-x509-client-auth/pom.xml +++ b/spring-security-modules/spring-security-web-x509/spring-security-web-x509-client-auth/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-security-web-x509-client-auth 0.0.1-SNAPSHOT @@ -71,4 +72,4 @@ - + \ No newline at end of file diff --git a/spring-security-modules/spring-session/pom.xml b/spring-security-modules/spring-session/pom.xml index ac10700240..aec64da088 100644 --- a/spring-security-modules/spring-session/pom.xml +++ b/spring-security-modules/spring-session/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 com.baeldung spring-session @@ -21,4 +22,4 @@ spring-session-mongodb - + \ No newline at end of file diff --git a/spring-security-modules/spring-session/spring-session-jdbc/pom.xml b/spring-security-modules/spring-session/spring-session-jdbc/pom.xml index 95c366fc2e..64bbce44f2 100644 --- a/spring-security-modules/spring-session/spring-session-jdbc/pom.xml +++ b/spring-security-modules/spring-session/spring-session-jdbc/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-session-jdbc 0.0.1-SNAPSHOT diff --git a/spring-security-modules/spring-session/spring-session-mongodb/pom.xml b/spring-security-modules/spring-session/spring-session-mongodb/pom.xml index 82c8520356..878dfeb690 100644 --- a/spring-security-modules/spring-session/spring-session-mongodb/pom.xml +++ b/spring-security-modules/spring-session/spring-session-mongodb/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-session-mongodb 0.0.1-SNAPSHOT @@ -21,23 +21,19 @@ org.springframework.boot spring-boot-starter-web - org.springframework.session spring-session-data-mongodb - org.springframework.boot spring-boot-starter-data-mongodb - org.springframework.boot spring-boot-starter-test test - de.flapdoodle.embed de.flapdoodle.embed.mongo diff --git a/spring-security-modules/spring-session/spring-session-redis/pom.xml b/spring-security-modules/spring-session/spring-session-redis/pom.xml index 36eb632e1c..6824a3632d 100644 --- a/spring-security-modules/spring-session/spring-session-redis/pom.xml +++ b/spring-security-modules/spring-session/spring-session-redis/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-session-redis 1.0.0-SNAPSHOT @@ -36,7 +37,7 @@ embedded-redis ${embedded-redis.version} - + redis.clients jedis jar diff --git a/spring-security-modules/spring-social-login/pom.xml b/spring-security-modules/spring-social-login/pom.xml index 209a546a5a..ad4b7c72a6 100644 --- a/spring-security-modules/spring-social-login/pom.xml +++ b/spring-security-modules/spring-social-login/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-social-login spring-social-login @@ -14,68 +15,54 @@ - org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-thymeleaf - org.springframework.security spring-security-web - org.springframework.security spring-security-config - org.springframework.security spring-security-taglibs - org.thymeleaf.extras thymeleaf-extras-springsecurity5 - - org.springframework.social spring-social-facebook ${spring.social.facebook.version} - org.springframework.boot spring-boot-starter-data-jpa - com.h2database h2 - - org.springframework spring-test test - org.apache.commons commons-lang3 ${commons-lang3.version} - @@ -86,7 +73,6 @@ true - org.apache.maven.plugins @@ -94,7 +80,7 @@ - + 2.0.3.RELEASE From e5aba6f8616aaaa1c63a5bbecb8a1cd5677a68ab Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Mon, 17 May 2021 20:23:08 +0530 Subject: [PATCH 05/28] JAVA-5223: Fix formatting of POMs (Other Spring Modules) --- spring-shell/pom.xml | 7 +- spring-sleuth/pom.xml | 7 +- spring-soap/pom.xml | 9 +- spring-spel/pom.xml | 5 +- spring-state-machine/pom.xml | 5 +- spring-static-resources/pom.xml | 17 +--- spring-swagger-codegen/pom.xml | 7 +- .../pom.xml | 90 +++++++++---------- .../spring-swagger-codegen-api-client/pom.xml | 13 +-- .../spring-swagger-codegen-app/pom.xml | 7 +- spring-threads/pom.xml | 7 +- spring-vault/pom.xml | 8 +- spring-vertx/pom.xml | 9 +- spring-webflux-amqp/pom.xml | 13 ++- spring-websockets/pom.xml | 7 +- 15 files changed, 96 insertions(+), 115 deletions(-) diff --git a/spring-shell/pom.xml b/spring-shell/pom.xml index be1562b942..4e64436486 100644 --- a/spring-shell/pom.xml +++ b/spring-shell/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-shell 0.1-SNAPSHOT @@ -26,4 +27,4 @@ 1.2.0.RELEASE - + \ No newline at end of file diff --git a/spring-sleuth/pom.xml b/spring-sleuth/pom.xml index c37086558d..5fd109e968 100644 --- a/spring-sleuth/pom.xml +++ b/spring-sleuth/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-sleuth 1.0.0-SNAPSHOT @@ -41,4 +42,4 @@ 2.0.2.RELEASE - + \ No newline at end of file diff --git a/spring-soap/pom.xml b/spring-soap/pom.xml index bea3d033e6..8188178d61 100644 --- a/spring-soap/pom.xml +++ b/spring-soap/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-soap 1.0.0 @@ -37,7 +38,6 @@ org.springframework.boot spring-boot-maven-plugin - org.codehaus.mojo @@ -58,7 +58,6 @@ - org.jvnet.jaxb2.maven2 maven-jaxb2-plugin @@ -84,4 +83,4 @@ - + \ No newline at end of file diff --git a/spring-spel/pom.xml b/spring-spel/pom.xml index 2109117a86..9ea51cd796 100644 --- a/spring-spel/pom.xml +++ b/spring-spel/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-spel 1.0-SNAPSHOT diff --git a/spring-state-machine/pom.xml b/spring-state-machine/pom.xml index acb14a7613..bc2b67cc38 100644 --- a/spring-state-machine/pom.xml +++ b/spring-state-machine/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-state-machine spring-state-machine diff --git a/spring-static-resources/pom.xml b/spring-static-resources/pom.xml index 662c757f54..2841da9028 100644 --- a/spring-static-resources/pom.xml +++ b/spring-static-resources/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-static-resources 0.1.0-SNAPSHOT @@ -31,7 +32,6 @@ spring-security-taglibs ${spring-security.version} - org.springframework @@ -74,7 +74,6 @@ spring-expression ${spring.version} - org.springframework spring-web @@ -85,7 +84,6 @@ spring-webmvc ${spring.version} - org.aspectj @@ -97,7 +95,6 @@ javax.inject ${inject.version} - javax.servlet @@ -119,41 +116,35 @@ jackson-databind ${jackson.version} - org.hibernate hibernate-validator ${hibernate-validator.version} - joda-time joda-time ${joda-time.version} - com.github.jknack handlebars ${handlebars.version} - commons-io commons-io ${commons-io.version} - org.springframework spring-test ${spring.version} test - @@ -204,14 +195,12 @@ 1.8.9 2.3.2-b02 - 6.0.10.Final 4.1.0 2.10 4.0.1 1 - 1.5.1 diff --git a/spring-swagger-codegen/pom.xml b/spring-swagger-codegen/pom.xml index 39d8902956..93cb51d07c 100644 --- a/spring-swagger-codegen/pom.xml +++ b/spring-swagger-codegen/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-swagger-codegen 0.0.1-SNAPSHOT @@ -19,4 +20,4 @@ spring-swagger-codegen-app - + \ No newline at end of file diff --git a/spring-swagger-codegen/spring-openapi-generator-api-client/pom.xml b/spring-swagger-codegen/spring-openapi-generator-api-client/pom.xml index 3074849e4c..c3e694ba80 100644 --- a/spring-swagger-codegen/spring-openapi-generator-api-client/pom.xml +++ b/spring-swagger-codegen/spring-openapi-generator-api-client/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 com.baeldung spring-openapi-generator-api-client @@ -13,7 +14,6 @@ scm:git:git@github.com:openapitools/openapi-generator.git https://github.com/openapitools/openapi-generator - Unlicense @@ -21,7 +21,6 @@ repo - OpenAPI-Generator Contributors @@ -31,51 +30,24 @@ - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - - - - io.swagger swagger-annotations ${swagger-annotations-version} - com.google.code.findbugs jsr305 3.0.2 - org.springframework spring-web ${spring-web-version} - com.fasterxml.jackson.core @@ -102,17 +74,16 @@ jackson-databind-nullable ${jackson-databind-nullable-version} - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-version} - - - com.github.joschi.jackson - jackson-datatype-threetenbp - ${jackson-threetenbp-version} - - + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + com.github.joschi.jackson + jackson-datatype-threetenbp + ${jackson-threetenbp-version} + junit @@ -174,7 +145,6 @@ - org.apache.maven.plugins @@ -191,7 +161,6 @@ - org.codehaus.mojo build-helper-maven-plugin @@ -228,8 +197,8 @@ maven-compiler-plugin 3.6.1 - 1.8 - 1.8 + 1.8 + 1.8 @@ -261,14 +230,39 @@ + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + 1.5.22 4.3.9.RELEASE 2.11.1 - + 0.2.1 2.9.10 1.0.0 4.13 - + + \ No newline at end of file diff --git a/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml b/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml index b9b97139d6..c9ba912feb 100644 --- a/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml +++ b/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml @@ -1,19 +1,18 @@ - + 4.0.0 spring-swagger-codegen-api-client spring-swagger-codegen-api-client jar https://github.com/swagger-api/swagger-codegen Swagger Java - scm:git:git@github.com:swagger-api/swagger-codegen.git scm:git:git@github.com:swagger-api/swagger-codegen.git https://github.com/swagger-api/swagger-codegen - Unlicense @@ -21,7 +20,6 @@ repo - Swagger @@ -44,14 +42,12 @@ swagger-annotations ${swagger-annotations-version} - org.springframework spring-web ${spring-web-version} - com.fasterxml.jackson.core @@ -103,7 +99,6 @@ - org.codehaus.mojo build-helper-maven-plugin @@ -199,4 +194,4 @@ 1.10 - + \ No newline at end of file diff --git a/spring-swagger-codegen/spring-swagger-codegen-app/pom.xml b/spring-swagger-codegen/spring-swagger-codegen-app/pom.xml index cb3fe89c8f..493b7201ee 100644 --- a/spring-swagger-codegen/spring-swagger-codegen-app/pom.xml +++ b/spring-swagger-codegen/spring-swagger-codegen-app/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-swagger-codegen-app spring-swagger-codegen-app @@ -46,4 +47,4 @@ 1.5.10.RELEASE - + \ No newline at end of file diff --git a/spring-threads/pom.xml b/spring-threads/pom.xml index 4513c627b9..31984bfbf5 100644 --- a/spring-threads/pom.xml +++ b/spring-threads/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-threads 0.0.1-SNAPSHOT @@ -22,4 +23,4 @@ - + \ No newline at end of file diff --git a/spring-vault/pom.xml b/spring-vault/pom.xml index a39c5575a9..759de80a6b 100644 --- a/spring-vault/pom.xml +++ b/spring-vault/pom.xml @@ -1,7 +1,7 @@ - + 4.0.0 spring-vault 0.0.1-SNAPSHOT @@ -41,4 +41,4 @@ 2.1.1.RELEASE - + \ No newline at end of file diff --git a/spring-vertx/pom.xml b/spring-vertx/pom.xml index ef169c9a27..bd2dfa6cf6 100644 --- a/spring-vertx/pom.xml +++ b/spring-vertx/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-vertx spring-vertx @@ -29,13 +30,11 @@ - io.vertx vertx-web ${vertx.version} - com.h2database h2 @@ -61,4 +60,4 @@ 3.4.1 - + \ No newline at end of file diff --git a/spring-webflux-amqp/pom.xml b/spring-webflux-amqp/pom.xml index 7a7f6ef600..498556da2d 100755 --- a/spring-webflux-amqp/pom.xml +++ b/spring-webflux-amqp/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 com.baeldung.spring spring-webflux-amqp @@ -22,7 +23,7 @@ org.springframework.boot spring-boot-dependencies - + 2.1.3.RELEASE pom import @@ -39,25 +40,21 @@ org.springframework.boot spring-boot-starter-webflux - org.springframework.boot spring-boot-configuration-processor true - org.springframework.boot spring-boot-starter-test test - io.projectreactor reactor-test test - org.springframework.boot spring-boot-starter-integration @@ -73,4 +70,4 @@ - + \ No newline at end of file diff --git a/spring-websockets/pom.xml b/spring-websockets/pom.xml index d2a32a8eb6..a28ef8749a 100644 --- a/spring-websockets/pom.xml +++ b/spring-websockets/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-websockets spring-websockets @@ -43,4 +44,4 @@ - + \ No newline at end of file From 5b49805e3c8bfdd659c0bd98f4427b1e3f0c4bf9 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Mon, 17 May 2021 20:23:25 +0530 Subject: [PATCH 06/28] JAVA-5223: Fix formatting of POMs (Spring Web Modules) --- spring-web-modules/pom.xml | 9 ++-- spring-web-modules/spring-5-mvc/pom.xml | 6 +-- spring-web-modules/spring-boot-jsp/pom.xml | 20 ++++----- .../spring-mvc-basics-2/pom.xml | 12 ++--- .../spring-mvc-basics-3/pom.xml | 19 ++------ .../spring-mvc-basics-4/pom.xml | 4 +- spring-web-modules/spring-mvc-basics/pom.xml | 9 ++-- spring-web-modules/spring-mvc-crash/pom.xml | 27 +---------- .../spring-mvc-forms-jsp/pom.xml | 10 ++--- .../spring-mvc-forms-thymeleaf/pom.xml | 8 ++-- spring-web-modules/spring-mvc-java-2/pom.xml | 7 ++- spring-web-modules/spring-mvc-java/pom.xml | 26 ++--------- .../spring-mvc-velocity/pom.xml | 16 ++----- spring-web-modules/spring-mvc-views/pom.xml | 11 +---- spring-web-modules/spring-mvc-webflow/pom.xml | 16 +++---- spring-web-modules/spring-mvc-xml/pom.xml | 25 +---------- .../spring-rest-angular/pom.xml | 7 +-- spring-web-modules/spring-rest-http-2/pom.xml | 7 +-- spring-web-modules/spring-rest-http/pom.xml | 10 ++--- .../spring-rest-query-language/pom.xml | 45 ++----------------- spring-web-modules/spring-rest-shell/pom.xml | 8 ++-- spring-web-modules/spring-rest-simple/pom.xml | 27 ++--------- .../spring-rest-testing/pom.xml | 28 ++---------- .../spring-resttemplate-2/pom.xml | 14 ++---- .../spring-resttemplate-3/pom.xml | 7 +-- .../spring-resttemplate/pom.xml | 29 ++---------- spring-web-modules/spring-thymeleaf-2/pom.xml | 9 ++-- spring-web-modules/spring-thymeleaf-3/pom.xml | 8 ++-- spring-web-modules/spring-thymeleaf/pom.xml | 18 ++------ 29 files changed, 112 insertions(+), 330 deletions(-) diff --git a/spring-web-modules/pom.xml b/spring-web-modules/pom.xml index ca96dcff35..e498185c5e 100644 --- a/spring-web-modules/pom.xml +++ b/spring-web-modules/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-web-modules 0.0.1-SNAPSHOT @@ -18,7 +19,7 @@ spring-mvc-basics spring-mvc-basics-2 spring-mvc-basics-3 - spring-mvc-basics-4 + spring-mvc-basics-4 spring-mvc-crash spring-mvc-forms-jsp spring-mvc-forms-thymeleaf @@ -44,4 +45,4 @@ spring-boot-jsp - + \ No newline at end of file diff --git a/spring-web-modules/spring-5-mvc/pom.xml b/spring-web-modules/spring-5-mvc/pom.xml index ddcce8207b..79a4f73ace 100644 --- a/spring-web-modules/spring-5-mvc/pom.xml +++ b/spring-web-modules/spring-5-mvc/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-5-mvc spring-5-mvc @@ -96,4 +96,4 @@ 0.18 - + \ No newline at end of file diff --git a/spring-web-modules/spring-boot-jsp/pom.xml b/spring-web-modules/spring-boot-jsp/pom.xml index d646b6058a..30335fcc65 100644 --- a/spring-web-modules/spring-boot-jsp/pom.xml +++ b/spring-web-modules/spring-boot-jsp/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-boot-jsp 0.0.1-SNAPSHOT @@ -35,8 +35,8 @@ org.apache.tomcat.embed tomcat-embed-jasper - - + + org.projectlombok @@ -48,12 +48,12 @@ org.springframework.boot spring-boot-starter-web - - - - - - + + + + + + org.springframework.boot spring-boot-starter-test diff --git a/spring-web-modules/spring-mvc-basics-2/pom.xml b/spring-web-modules/spring-mvc-basics-2/pom.xml index adc42d8db8..9136676d20 100644 --- a/spring-web-modules/spring-mvc-basics-2/pom.xml +++ b/spring-web-modules/spring-mvc-basics-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-mvc-basics-2 0.0.1-SNAPSHOT @@ -60,7 +61,6 @@ spring-tx ${spring.version} - org.thymeleaf @@ -72,7 +72,6 @@ thymeleaf-spring5 ${org.thymeleaf-version} - org.freemarker @@ -89,21 +88,18 @@ spring-boot-starter-freemarker ${spring-boot.version} - org.codehaus.groovy groovy-templates ${groovy.version} - de.neuland-bfi spring-jade4j ${jade.version} - org.springframework @@ -171,4 +167,4 @@ 2.3.4.RELEASE - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-basics-3/pom.xml b/spring-web-modules/spring-mvc-basics-3/pom.xml index a9245814a8..f9710ff2d1 100644 --- a/spring-web-modules/spring-mvc-basics-3/pom.xml +++ b/spring-web-modules/spring-mvc-basics-3/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-mvc-basics-3 spring-mvc-basics-3 @@ -15,69 +16,57 @@ - org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-validation - org.springframework.boot spring-boot-starter-test test - org.springframework.boot spring-boot-starter-thymeleaf provided - org.springframework.boot spring-boot-starter-data-jpa - org.springframework.boot spring-boot-starter-mail - org.springframework.boot spring-boot-starter-actuator - com.h2database h2 runtime - javax.persistence javax.persistence-api ${jpa.version} - com.google.guava guava ${guava.version} - org.subethamail subethasmtp ${subethasmtp.version} test - org.apache.httpcomponents httpclient @@ -146,4 +135,4 @@ 4.5.8 - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-basics-4/pom.xml b/spring-web-modules/spring-mvc-basics-4/pom.xml index 07dddcde0c..067d1ed3b1 100644 --- a/spring-web-modules/spring-mvc-basics-4/pom.xml +++ b/spring-web-modules/spring-mvc-basics-4/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-mvc-basics-4 spring-mvc-basics-4 diff --git a/spring-web-modules/spring-mvc-basics/pom.xml b/spring-web-modules/spring-mvc-basics/pom.xml index ac92c7bfe5..9fe4494393 100644 --- a/spring-web-modules/spring-mvc-basics/pom.xml +++ b/spring-web-modules/spring-mvc-basics/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-mvc-basics 0.1-SNAPSHOT @@ -28,7 +28,7 @@ commons-fileupload commons-fileupload ${commons-fileupload.version} - + org.apache.tomcat.embed @@ -60,5 +60,4 @@ - - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-crash/pom.xml b/spring-web-modules/spring-mvc-crash/pom.xml index 9a0d97bae9..9574eff2a4 100644 --- a/spring-web-modules/spring-mvc-crash/pom.xml +++ b/spring-web-modules/spring-mvc-crash/pom.xml @@ -15,9 +15,7 @@ - - org.springframework spring-web @@ -28,37 +26,30 @@ spring-webmvc ${org.springframework.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - org.hibernate.validator hibernate-validator ${hibernate-validator.version} - - com.fasterxml.jackson.core jackson-databind ${jackson.version} - commons-io @@ -85,14 +76,12 @@ javax.el ${javax.el.version} - org.springframework.boot spring-boot-starter-test ${spring-boot.version} test - org.crashub @@ -115,7 +104,6 @@ - org.codehaus.groovy @@ -125,52 +113,41 @@ - spring-mvc-xml + spring-mvc-crash src/main/resources true - - org.apache.maven.plugins maven-war-plugin ${maven-war-plugin.version} - - 5.0.2.RELEASE 1.5.10.RELEASE - 5.1.40 - 4.4.5 4.5.2 - 6.0.10.Final 3.0.1-b08 - 19.0 2.8.0 - 1.6.1 - 1.3.2 3.0.0-rc-3 - - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-forms-jsp/pom.xml b/spring-web-modules/spring-mvc-forms-jsp/pom.xml index 0ca23bd6cb..94eb51a32d 100644 --- a/spring-web-modules/spring-mvc-forms-jsp/pom.xml +++ b/spring-web-modules/spring-mvc-forms-jsp/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 0.1-SNAPSHOT spring-mvc-forms-jsp @@ -91,7 +92,7 @@ - spring-mvc-forms + spring-mvc-forms-jsp @@ -102,5 +103,4 @@ 6.0.6 - - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml b/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml index 641f64b93c..fdd569d144 100644 --- a/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-mvc-forms-thymeleaf spring-mvc-forms-thymeleaf @@ -23,7 +24,6 @@ org.springframework.boot spring-boot-starter-thymeleaf - org.springframework.boot @@ -42,4 +42,4 @@ com.baeldung.sessionattrs.SessionAttrsApplication - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-java-2/pom.xml b/spring-web-modules/spring-mvc-java-2/pom.xml index 8a025defac..1bbb066786 100644 --- a/spring-web-modules/spring-mvc-java-2/pom.xml +++ b/spring-web-modules/spring-mvc-java-2/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-mvc-java-2 0.1-SNAPSHOT @@ -53,5 +53,4 @@ 5.2.2.RELEASE - - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-java/pom.xml b/spring-web-modules/spring-mvc-java/pom.xml index 1324511215..b8f5ec7910 100644 --- a/spring-web-modules/spring-mvc-java/pom.xml +++ b/spring-web-modules/spring-mvc-java/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-mvc-java 0.1-SNAPSHOT @@ -68,8 +69,6 @@ commons-fileupload ${commons-fileupload.version} - - org.thymeleaf @@ -81,7 +80,6 @@ thymeleaf ${thymeleaf.version} - com.jayway.jsonpath json-path @@ -93,14 +91,12 @@ spring-boot-starter-test test - org.apache.poi poi-ooxml ${poi.version} - org.hibernate.validator @@ -122,14 +118,11 @@ true - - maven-resources-plugin ${maven-resources-plugin.version} - org.apache.maven.plugins maven-war-plugin @@ -138,7 +131,6 @@ false - org.codehaus.cargo cargo-maven2-plugin @@ -217,43 +209,34 @@ - 3.0.9.RELEASE - 6.0.10.Final 5.1.40 - 6.0.10.Final - 19.0 2.2.0 - 4.4.5 4.5.2 3.0.7 2.23 - 3.2.2 2.7 1.6.1 3.1.0 - 1.9.1 - 3.16-beta1 - 3.0.1-b09 4.0.1 2.3.3 @@ -262,5 +245,4 @@ com.baeldung.SpringMVCApplication - - + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-velocity/pom.xml b/spring-web-modules/spring-mvc-velocity/pom.xml index 05016962a5..1b1e8b1ea4 100644 --- a/spring-web-modules/spring-mvc-velocity/pom.xml +++ b/spring-web-modules/spring-mvc-velocity/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-mvc-velocity 0.1-SNAPSHOT @@ -15,9 +16,7 @@ - - org.springframework spring-web @@ -33,22 +32,18 @@ spring-context-support ${spring.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - org.apache.velocity velocity ${velocity.version} - org.apache.velocity velocity-tools @@ -60,7 +55,6 @@ - org.powermock @@ -80,7 +74,6 @@ ${spring.version} test - @@ -91,7 +84,6 @@ true - org.apache.maven.plugins @@ -107,13 +99,11 @@ 1.6.6 - 4.4.5 4.5.2 1.7 2.0 2.9.0 - 2.7 1.6.1 diff --git a/spring-web-modules/spring-mvc-views/pom.xml b/spring-web-modules/spring-mvc-views/pom.xml index 649814263c..7e48175ff2 100644 --- a/spring-web-modules/spring-mvc-views/pom.xml +++ b/spring-web-modules/spring-mvc-views/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-mvc-views war @@ -50,37 +50,31 @@ hibernate-core ${hibernate.version} - org.hsqldb hsqldb ${hsqldb.version} - org.springframework.security spring-security-web ${spring.security.version} - org.springframework.security spring-security-config ${spring.security.version} - org.springframework.security spring-security-taglibs ${spring.security.version} - org.apache.tiles tiles-jsp ${apache-tiles.version} - @@ -95,7 +89,6 @@ ${java.version} - org.apache.maven.plugins maven-war-plugin diff --git a/spring-web-modules/spring-mvc-webflow/pom.xml b/spring-web-modules/spring-mvc-webflow/pom.xml index ab0f86394a..2e150e2d01 100644 --- a/spring-web-modules/spring-mvc-webflow/pom.xml +++ b/spring-web-modules/spring-mvc-webflow/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-mvc-webflow 0.1-SNAPSHOT @@ -14,7 +15,6 @@ - org.springframework @@ -26,14 +26,12 @@ spring-webmvc ${org.springframework.version} - org.springframework.webflow spring-webflow ${spring.webflow} - javax.servlet @@ -52,7 +50,6 @@ log4j-over-slf4j ${org.slf4j.version} - org.springframework.boot @@ -60,7 +57,6 @@ ${spring-boot-starter-test.version} test - @@ -86,7 +82,8 @@ .class - -Xmx2048m -XX:PermSize=256m -Dtomee.serialization.class.blacklist=- -Dtomee.serialization.class.whitelist=* + -Xmx2048m -XX:PermSize=256m -Dtomee.serialization.class.blacklist=- + -Dtomee.serialization.class.whitelist=* true @@ -104,13 +101,10 @@ 5.0.1.RELEASE - 2.5.0.RELEASE - 4.4.5 4.5.2 - 2.7 1.6.1 diff --git a/spring-web-modules/spring-mvc-xml/pom.xml b/spring-web-modules/spring-mvc-xml/pom.xml index 4812d5c979..354d652095 100644 --- a/spring-web-modules/spring-mvc-xml/pom.xml +++ b/spring-web-modules/spring-mvc-xml/pom.xml @@ -15,9 +15,7 @@ - - org.springframework spring-web @@ -28,37 +26,30 @@ spring-webmvc ${org.springframework.version} - - javax.servlet javax.servlet-api ${javax.servlet-api.version} provided - javax.servlet jstl ${jstl.version} runtime - org.hibernate.validator hibernate-validator ${hibernate-validator.version} - - com.fasterxml.jackson.core jackson-databind ${jackson.version} - commons-io @@ -85,14 +76,12 @@ javax.el ${javax.el.version} - org.springframework.boot spring-boot-starter-test ${spring-boot.version} test - org.crashub @@ -115,7 +104,6 @@ - org.codehaus.groovy @@ -132,45 +120,34 @@ true - - org.apache.maven.plugins maven-war-plugin ${maven-war-plugin.version} - - 5.0.2.RELEASE 1.5.10.RELEASE - 5.1.40 - 4.4.5 4.5.2 - 6.0.10.Final 3.0.1-b08 - 19.0 2.8.0 - 1.6.1 - 1.3.2 3.0.0-rc-3 - - + \ No newline at end of file diff --git a/spring-web-modules/spring-rest-angular/pom.xml b/spring-web-modules/spring-rest-angular/pom.xml index eb1ec8696c..ef14e78198 100644 --- a/spring-web-modules/spring-rest-angular/pom.xml +++ b/spring-web-modules/spring-rest-angular/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-rest-angular 1.0 @@ -77,4 +78,4 @@ com.baeldung.web.main.Application - + \ No newline at end of file diff --git a/spring-web-modules/spring-rest-http-2/pom.xml b/spring-web-modules/spring-rest-http-2/pom.xml index a349ac1116..10d904e302 100644 --- a/spring-web-modules/spring-rest-http-2/pom.xml +++ b/spring-web-modules/spring-rest-http-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-rest-http-2 0.1-SNAPSHOT @@ -53,4 +54,4 @@ 1.6.1 - + \ No newline at end of file diff --git a/spring-web-modules/spring-rest-http/pom.xml b/spring-web-modules/spring-rest-http/pom.xml index 94d1be7814..5a92b585e3 100644 --- a/spring-web-modules/spring-rest-http/pom.xml +++ b/spring-web-modules/spring-rest-http/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-rest-http 0.1-SNAPSHOT @@ -15,7 +16,6 @@ - org.springframework.boot spring-boot-starter-web @@ -54,13 +54,11 @@ json-patch ${jsonpatch.version} - - 1.4.9 1.12 - + \ No newline at end of file diff --git a/spring-web-modules/spring-rest-query-language/pom.xml b/spring-web-modules/spring-rest-query-language/pom.xml index 5e7ca023dd..c5a8c172f3 100644 --- a/spring-web-modules/spring-rest-query-language/pom.xml +++ b/spring-web-modules/spring-rest-query-language/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-rest-query-language 0.1-SNAPSHOT @@ -15,7 +16,6 @@ - org.springframework.boot @@ -25,7 +25,6 @@ org.springframework.boot spring-boot-starter-actuator - org.aspectj aspectjweaver @@ -35,9 +34,7 @@ tomcat-embed-jasper provided - - org.springframework spring-core @@ -84,16 +81,12 @@ org.springframework.data spring-data-commons - - org.springframework.boot spring-boot-starter-tomcat - - com.querydsl querydsl-apt @@ -102,17 +95,13 @@ com.querydsl querydsl-jpa - - cz.jirutka.rsql rsql-parser ${rsql.version} - - org.apache.httpcomponents httpclient @@ -127,9 +116,7 @@ org.apache.httpcomponents httpcore - - org.springframework spring-orm @@ -157,67 +144,53 @@ mysql-connector-java runtime - com.h2database h2 - - javax.servlet javax.servlet-api provided - javax.servlet jstl runtime - - com.fasterxml.jackson.core jackson-databind - com.thoughtworks.xstream xstream ${xstream.version} - - com.google.guava guava ${guava.version} - - org.springframework spring-test test - org.hamcrest hamcrest test - org.mockito mockito-core test - @@ -228,14 +201,11 @@ true - - org.apache.maven.plugins maven-war-plugin - org.codehaus.cargo cargo-maven2-plugin @@ -256,9 +226,7 @@ - - com.mysema.maven apt-maven-plugin @@ -275,9 +243,7 @@ - - @@ -342,18 +308,15 @@ 2.1.0 - 1.4.9 3.21.0-GA 1.4.01 - 19.0 - 1.7.0 1.1.3 - + \ No newline at end of file diff --git a/spring-web-modules/spring-rest-shell/pom.xml b/spring-web-modules/spring-rest-shell/pom.xml index f5792fd6ca..b83a0b6002 100644 --- a/spring-web-modules/spring-rest-shell/pom.xml +++ b/spring-web-modules/spring-rest-shell/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-rest-shell spring-rest-shell @@ -28,7 +29,6 @@ org.springframework.boot spring-boot-starter-data-rest - com.h2database @@ -46,4 +46,4 @@ - + \ No newline at end of file diff --git a/spring-web-modules/spring-rest-simple/pom.xml b/spring-web-modules/spring-rest-simple/pom.xml index b9d5100fbf..e7671e0af0 100644 --- a/spring-web-modules/spring-rest-simple/pom.xml +++ b/spring-web-modules/spring-rest-simple/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-rest-simple 0.1-SNAPSHOT @@ -15,7 +16,6 @@ - org.springframework.boot @@ -38,7 +38,6 @@ org.springframework.boot spring-boot-starter-web - org.springframework @@ -64,7 +63,6 @@ ${commons-fileupload.version} - javax.servlet javax.servlet-api @@ -75,9 +73,7 @@ jstl runtime - - com.fasterxml.jackson.core jackson-databind @@ -91,9 +87,7 @@ xstream ${xstream.version} - - com.google.guava guava @@ -104,9 +98,7 @@ commons-lang3 ${commons-lang3.version} - - org.slf4j slf4j-api @@ -121,17 +113,13 @@ jcl-over-slf4j - - com.squareup.okhttp3 okhttp ${com.squareup.okhttp3.version} - - junit junit @@ -258,7 +246,6 @@ - live @@ -283,7 +270,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -307,7 +293,6 @@ - @@ -318,19 +303,15 @@ 1.4 3.1.0 1.4.9 - 20.0 2.9.0 - 1.6.0 3.0.4 - 3.4.1 - 2.2.0 - + \ No newline at end of file diff --git a/spring-web-modules/spring-rest-testing/pom.xml b/spring-web-modules/spring-rest-testing/pom.xml index fea8d25e4d..dc5fdcd323 100644 --- a/spring-web-modules/spring-rest-testing/pom.xml +++ b/spring-web-modules/spring-rest-testing/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-rest-testing 0.1-SNAPSHOT @@ -15,7 +16,6 @@ - org.springframework.boot @@ -34,9 +34,7 @@ tomcat-embed-jasper provided - - org.springframework spring-core @@ -83,16 +81,12 @@ org.springframework.data spring-data-commons - - org.springframework.boot spring-boot-starter-tomcat - - org.apache.httpcomponents httpclient @@ -107,9 +101,7 @@ org.apache.httpcomponents httpcore - - org.springframework spring-orm @@ -145,9 +137,7 @@ net.bytebuddy byte-buddy - - javax.servlet javax.servlet-api @@ -158,41 +148,33 @@ jstl runtime - com.fasterxml.jackson.core jackson-databind - - com.google.guava guava ${guava.version} - - org.springframework spring-test test - org.hamcrest hamcrest test - org.mockito mockito-core test - @@ -285,14 +267,12 @@ 1.4.9 1.4.01 - 19.0 3.25.0-GA - 1.6.1 1.1.3 - + \ No newline at end of file diff --git a/spring-web-modules/spring-resttemplate-2/pom.xml b/spring-web-modules/spring-resttemplate-2/pom.xml index 158380b403..d0191b970e 100644 --- a/spring-web-modules/spring-resttemplate-2/pom.xml +++ b/spring-web-modules/spring-resttemplate-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-resttemplate-2 0.1-SNAPSHOT @@ -15,7 +16,6 @@ - org.springframework.boot @@ -27,29 +27,23 @@ - org.springframework.boot spring-boot-starter-jetty - org.apache.httpcomponents httpclient - commons-io commons-io ${commons-io.version} - org.springframework.boot spring-boot-starter-test - - org.springframework @@ -61,7 +55,6 @@ - org.slf4j @@ -71,7 +64,6 @@ ch.qos.logback logback-classic - diff --git a/spring-web-modules/spring-resttemplate-3/pom.xml b/spring-web-modules/spring-resttemplate-3/pom.xml index b1c26e002f..8e313ccf39 100644 --- a/spring-web-modules/spring-resttemplate-3/pom.xml +++ b/spring-web-modules/spring-resttemplate-3/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-resttemplate-3 0.1-SNAPSHOT @@ -26,4 +27,4 @@ - + \ No newline at end of file diff --git a/spring-web-modules/spring-resttemplate/pom.xml b/spring-web-modules/spring-resttemplate/pom.xml index 1db6b5db57..221efd77ee 100644 --- a/spring-web-modules/spring-resttemplate/pom.xml +++ b/spring-web-modules/spring-resttemplate/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-resttemplate 0.1-SNAPSHOT @@ -15,7 +16,6 @@ - org.springframework.boot @@ -37,14 +37,11 @@ org.springframework.boot spring-boot-starter-test - - au.com.dius pact-jvm-provider-junit_2.11 ${pact.version} - org.springframework @@ -64,9 +61,7 @@ org.springframework spring-oxm - - com.fasterxml.jackson.core jackson-databind @@ -80,9 +75,7 @@ xstream ${xstream.version} - - com.google.guava guava @@ -93,9 +86,7 @@ commons-lang3 ${commons-lang3.version} - - org.slf4j slf4j-api @@ -110,24 +101,19 @@ jcl-over-slf4j - - com.squareup.okhttp3 okhttp ${com.squareup.okhttp3.version} - - junit junit ${junit.version} - org.hamcrest hamcrest @@ -153,7 +139,6 @@ - org.apache.maven.plugins maven-compiler-plugin @@ -232,7 +217,6 @@ - @@ -260,7 +244,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -284,7 +267,6 @@ - @@ -292,14 +274,11 @@ 1.4.9 - 20.0 - 1.6.1 3.0.4 - 3.4.1 3.5.11 @@ -309,4 +288,4 @@ 3.7.0 - + \ No newline at end of file diff --git a/spring-web-modules/spring-thymeleaf-2/pom.xml b/spring-web-modules/spring-thymeleaf-2/pom.xml index ddcd1e1005..b2b893ecd5 100644 --- a/spring-web-modules/spring-thymeleaf-2/pom.xml +++ b/spring-web-modules/spring-thymeleaf-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-thymeleaf-2 spring-thymeleaf-2 @@ -26,7 +27,6 @@ org.springframework.boot spring-boot-starter-thymeleaf - org.springframework.boot spring-boot-starter-test @@ -40,7 +40,6 @@ org.apache.maven.plugins maven-war-plugin - org.apache.tomcat.maven tomcat7-maven-plugin @@ -71,4 +70,4 @@ 2.2 - + \ No newline at end of file diff --git a/spring-web-modules/spring-thymeleaf-3/pom.xml b/spring-web-modules/spring-thymeleaf-3/pom.xml index 6a46dca117..8f39c17d8c 100644 --- a/spring-web-modules/spring-thymeleaf-3/pom.xml +++ b/spring-web-modules/spring-thymeleaf-3/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-thymeleaf-3 spring-thymeleaf-3 @@ -56,7 +57,6 @@ org.apache.maven.plugins maven-war-plugin - org.apache.tomcat.maven tomcat7-maven-plugin @@ -87,4 +87,4 @@ 2.2 - + \ No newline at end of file diff --git a/spring-web-modules/spring-thymeleaf/pom.xml b/spring-web-modules/spring-thymeleaf/pom.xml index 7b0cd2c510..8201cb5c5b 100644 --- a/spring-web-modules/spring-thymeleaf/pom.xml +++ b/spring-web-modules/spring-thymeleaf/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-thymeleaf 0.1-SNAPSHOT @@ -33,13 +34,11 @@ spring-webmvc ${spring.version} - org.springframework.data spring-data-commons ${spring-data.version} - javax.validation validation-api @@ -50,7 +49,6 @@ hibernate-validator ${hibernate-validator.version} - org.springframework.security @@ -62,7 +60,6 @@ spring-security-config ${spring-security.version} - org.thymeleaf @@ -84,7 +81,6 @@ thymeleaf-extras-java8time ${org.thymeleaf.extras-version} - javax.servlet @@ -92,7 +88,6 @@ ${javax.servlet-api.version} provided - org.springframework @@ -100,14 +95,12 @@ ${spring.version} test - org.springframework.security spring-security-test ${spring-security.version} test - @@ -120,7 +113,6 @@ false - org.codehaus.cargo cargo-maven2-plugin @@ -140,7 +132,6 @@ - @@ -151,9 +142,8 @@ 2.4.1 2.0.1.Final 6.0.11.Final - 1.6.1 - + \ No newline at end of file From d9db0949cbe7f8b86e5d55067d29e09afe39e96a Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Mon, 17 May 2021 20:23:43 +0530 Subject: [PATCH 07/28] JAVA-5223: Fix formatting of POMs (Testing Modules) --- testing-modules/assertion-libraries/pom.xml | 7 +- testing-modules/cucumber/pom.xml | 46 +++++---- testing-modules/easy-random/pom.xml | 4 +- testing-modules/easymock/pom.xml | 8 +- testing-modules/gatling/pom.xml | 6 +- testing-modules/groovy-spock/pom.xml | 7 +- testing-modules/hamcrest/pom.xml | 5 +- testing-modules/junit-4/pom.xml | 6 +- testing-modules/junit-5-advanced/pom.xml | 6 +- testing-modules/junit-5-basics/pom.xml | 6 +- testing-modules/junit-5/pom.xml | 8 +- testing-modules/junit5-annotations/pom.xml | 7 +- testing-modules/junit5-migration/pom.xml | 7 +- .../load-testing-comparison/pom.xml | 98 +++++++++---------- testing-modules/mockito-2/pom.xml | 7 +- testing-modules/mockito-3/pom.xml | 2 +- testing-modules/mockito/pom.xml | 9 +- testing-modules/mocks/pom.xml | 9 +- testing-modules/mockserver/pom.xml | 5 +- .../math-test-functions/pom.xml | 8 +- testing-modules/parallel-tests-junit/pom.xml | 7 +- .../string-test-functions/pom.xml | 8 +- testing-modules/pom.xml | 9 +- testing-modules/powermock/pom.xml | 11 ++- testing-modules/rest-assured/pom.xml | 27 +---- testing-modules/rest-testing/pom.xml | 20 +--- testing-modules/selenium-junit-testng/pom.xml | 2 +- testing-modules/spring-testing-2/pom.xml | 16 +-- testing-modules/spring-testing/pom.xml | 7 +- testing-modules/test-containers/pom.xml | 8 +- testing-modules/testing-assertions/pom.xml | 5 +- testing-modules/testing-libraries-2/pom.xml | 6 +- testing-modules/testing-libraries/pom.xml | 9 +- testing-modules/testng/pom.xml | 5 +- testing-modules/xmlunit-2/pom.xml | 7 +- testing-modules/zerocode/pom.xml | 16 ++- 36 files changed, 194 insertions(+), 230 deletions(-) diff --git a/testing-modules/assertion-libraries/pom.xml b/testing-modules/assertion-libraries/pom.xml index c8ab512e4b..19ebebce05 100644 --- a/testing-modules/assertion-libraries/pom.xml +++ b/testing-modules/assertion-libraries/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 assertion-libraries 0.1-SNAPSHOT @@ -72,4 +73,4 @@ 0.12 - + \ No newline at end of file diff --git a/testing-modules/cucumber/pom.xml b/testing-modules/cucumber/pom.xml index af1935aa17..531b16ddec 100644 --- a/testing-modules/cucumber/pom.xml +++ b/testing-modules/cucumber/pom.xml @@ -1,8 +1,11 @@ - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + cucumber + 1.0-SNAPSHOT + cucumber com.baeldung @@ -12,25 +15,6 @@ - 4.0.0 - cucumber - 1.0-SNAPSHOT - cucumber - - - 14 - 14 - 6.10.3 - 5.4.0 - 2.22.2 - 3.141.59 - 4.3.1 - 0.40 - 3.0.0 - 4.5.3 - 2.2.5.RELEASE - - org.springframework.boot @@ -55,7 +39,6 @@ bootstrap ${bootstrap.version} - org.projectlombok lombok @@ -136,4 +119,19 @@ - + + + 14 + 14 + 6.10.3 + 5.4.0 + 2.22.2 + 3.141.59 + 4.3.1 + 0.40 + 3.0.0 + 4.5.3 + 2.2.5.RELEASE + + + \ No newline at end of file diff --git a/testing-modules/easy-random/pom.xml b/testing-modules/easy-random/pom.xml index 1a1f3f743d..1ea6fbc387 100644 --- a/testing-modules/easy-random/pom.xml +++ b/testing-modules/easy-random/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 easy-random easy-random diff --git a/testing-modules/easymock/pom.xml b/testing-modules/easymock/pom.xml index 98458b724d..a8e37da8eb 100644 --- a/testing-modules/easymock/pom.xml +++ b/testing-modules/easymock/pom.xml @@ -1,7 +1,7 @@ - + 4.0.0 easymock easymock @@ -26,4 +26,4 @@ 4.0.2 - + \ No newline at end of file diff --git a/testing-modules/gatling/pom.xml b/testing-modules/gatling/pom.xml index 99eaaac044..281c74d6b3 100644 --- a/testing-modules/gatling/pom.xml +++ b/testing-modules/gatling/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.baeldung gatling @@ -115,4 +115,4 @@ 3.0.4 - + \ No newline at end of file diff --git a/testing-modules/groovy-spock/pom.xml b/testing-modules/groovy-spock/pom.xml index fa2c98a884..3c1f00abdf 100644 --- a/testing-modules/groovy-spock/pom.xml +++ b/testing-modules/groovy-spock/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 org.spockframework groovy-spock @@ -53,4 +54,4 @@ 1.5 - + \ No newline at end of file diff --git a/testing-modules/hamcrest/pom.xml b/testing-modules/hamcrest/pom.xml index ec9177d8f2..df8c543edb 100644 --- a/testing-modules/hamcrest/pom.xml +++ b/testing-modules/hamcrest/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 hamcrest @@ -27,4 +28,4 @@ 2.0.0.0 - + \ No newline at end of file diff --git a/testing-modules/junit-4/pom.xml b/testing-modules/junit-4/pom.xml index be0f51ea23..0ae6b71f82 100644 --- a/testing-modules/junit-4/pom.xml +++ b/testing-modules/junit-4/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 junit-4 1.0-SNAPSHOT @@ -28,4 +28,4 @@ 1.1.0 - + \ No newline at end of file diff --git a/testing-modules/junit-5-advanced/pom.xml b/testing-modules/junit-5-advanced/pom.xml index f53af9347f..5fc466bb67 100644 --- a/testing-modules/junit-5-advanced/pom.xml +++ b/testing-modules/junit-5-advanced/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 junit-5-advanced 1.0-SNAPSHOT @@ -40,4 +40,4 @@ 5.4.2 - + \ No newline at end of file diff --git a/testing-modules/junit-5-basics/pom.xml b/testing-modules/junit-5-basics/pom.xml index cdb0c367ce..0358f0c29a 100644 --- a/testing-modules/junit-5-basics/pom.xml +++ b/testing-modules/junit-5-basics/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 junit-5-basics 1.0-SNAPSHOT @@ -154,4 +154,4 @@ 5.0.6.RELEASE - + \ No newline at end of file diff --git a/testing-modules/junit-5/pom.xml b/testing-modules/junit-5/pom.xml index 90898ebb3f..125fa77423 100644 --- a/testing-modules/junit-5/pom.xml +++ b/testing-modules/junit-5/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 junit-5 @@ -88,7 +89,6 @@ ${mockito.junit.jupiter.version} test - org.powermock powermock-api-mockito2 @@ -140,4 +140,4 @@ 3.0.0-M3 - + \ No newline at end of file diff --git a/testing-modules/junit5-annotations/pom.xml b/testing-modules/junit5-annotations/pom.xml index 7ffc17c69b..127a1bf33f 100644 --- a/testing-modules/junit5-annotations/pom.xml +++ b/testing-modules/junit5-annotations/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 junit5-annotations 1.0-SNAPSHOT @@ -61,4 +62,4 @@ 3.11.1 - + \ No newline at end of file diff --git a/testing-modules/junit5-migration/pom.xml b/testing-modules/junit5-migration/pom.xml index bab7bc0406..2e864f6434 100644 --- a/testing-modules/junit5-migration/pom.xml +++ b/testing-modules/junit5-migration/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 junit5-migration 1.0-SNAPSHOT @@ -56,4 +57,4 @@ 2.21.0 - + \ No newline at end of file diff --git a/testing-modules/load-testing-comparison/pom.xml b/testing-modules/load-testing-comparison/pom.xml index 4c237aeb75..63f2d9ce2f 100644 --- a/testing-modules/load-testing-comparison/pom.xml +++ b/testing-modules/load-testing-comparison/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 load-testing-comparison load-testing-comparison @@ -57,57 +57,57 @@ - - - - - - - - - - + + + + + + + + + + org.springframework.boot spring-boot-maven-plugin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -122,4 +122,4 @@ 5.0 - + \ No newline at end of file diff --git a/testing-modules/mockito-2/pom.xml b/testing-modules/mockito-2/pom.xml index 055debe615..558ac59d08 100644 --- a/testing-modules/mockito-2/pom.xml +++ b/testing-modules/mockito-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 mockito-2 0.0.1-SNAPSHOT @@ -32,4 +33,4 @@ 2.21.0 - + \ No newline at end of file diff --git a/testing-modules/mockito-3/pom.xml b/testing-modules/mockito-3/pom.xml index 8d506561ed..5a150ccbf9 100644 --- a/testing-modules/mockito-3/pom.xml +++ b/testing-modules/mockito-3/pom.xml @@ -35,4 +35,4 @@ 3.8.0 - + \ No newline at end of file diff --git a/testing-modules/mockito/pom.xml b/testing-modules/mockito/pom.xml index ea5ef4c322..a159f609a5 100644 --- a/testing-modules/mockito/pom.xml +++ b/testing-modules/mockito/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 mockito 0.1-SNAPSHOT @@ -34,15 +35,12 @@ javax.persistence ${javax.persistence.version} - - org.apache.commons commons-lang3 ${commons-lang3.version} - org.springframework.boot @@ -74,7 +72,6 @@ 2.0.9.RELEASE 19.0 - 2.0.2 2.1.1 diff --git a/testing-modules/mocks/pom.xml b/testing-modules/mocks/pom.xml index abaf313dc5..17700a835e 100644 --- a/testing-modules/mocks/pom.xml +++ b/testing-modules/mocks/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 mocks mocks @@ -36,14 +37,12 @@ ${mockito.version} test - org.easymock easymock ${easymock.version} test - com.google.jimfs jimfs @@ -60,4 +59,4 @@ 1.1 - + \ No newline at end of file diff --git a/testing-modules/mockserver/pom.xml b/testing-modules/mockserver/pom.xml index 6d553f4b90..c039d6a0ab 100644 --- a/testing-modules/mockserver/pom.xml +++ b/testing-modules/mockserver/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 mockserver 1.0.0-SNAPSHOT diff --git a/testing-modules/parallel-tests-junit/math-test-functions/pom.xml b/testing-modules/parallel-tests-junit/math-test-functions/pom.xml index fdd45e19d6..39199834b9 100644 --- a/testing-modules/parallel-tests-junit/math-test-functions/pom.xml +++ b/testing-modules/parallel-tests-junit/math-test-functions/pom.xml @@ -1,7 +1,7 @@ - + 4.0.0 math-test-functions math-test-functions @@ -49,4 +49,4 @@ 2.22.0 - + \ No newline at end of file diff --git a/testing-modules/parallel-tests-junit/pom.xml b/testing-modules/parallel-tests-junit/pom.xml index f9c47c827c..f5a46b91e3 100644 --- a/testing-modules/parallel-tests-junit/pom.xml +++ b/testing-modules/parallel-tests-junit/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 parallel-tests-junit 0.0.1-SNAPSHOT @@ -19,4 +20,4 @@ string-test-functions - + \ No newline at end of file diff --git a/testing-modules/parallel-tests-junit/string-test-functions/pom.xml b/testing-modules/parallel-tests-junit/string-test-functions/pom.xml index 727a1f814a..39847444b5 100644 --- a/testing-modules/parallel-tests-junit/string-test-functions/pom.xml +++ b/testing-modules/parallel-tests-junit/string-test-functions/pom.xml @@ -1,7 +1,7 @@ - + 4.0.0 string-test-functions string-test-functions @@ -41,4 +41,4 @@ 2.22.0 - + \ No newline at end of file diff --git a/testing-modules/pom.xml b/testing-modules/pom.xml index d2afd4ae70..28c743b2b3 100644 --- a/testing-modules/pom.xml +++ b/testing-modules/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 testing-modules testing-modules @@ -29,7 +30,7 @@ junit5-migration load-testing-comparison mockito-2 - mockito-3 + mockito-3 mockito mocks mockserver @@ -49,4 +50,4 @@ zerocode - + \ No newline at end of file diff --git a/testing-modules/powermock/pom.xml b/testing-modules/powermock/pom.xml index 39d5f96d0a..7179f3ffbe 100644 --- a/testing-modules/powermock/pom.xml +++ b/testing-modules/powermock/pom.xml @@ -1,15 +1,15 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + powermock + testing-modules com.baeldung 1.0.0-SNAPSHOT - 4.0.0 - - powermock @@ -30,4 +30,5 @@ 2.21.0 2.0.7 + \ No newline at end of file diff --git a/testing-modules/rest-assured/pom.xml b/testing-modules/rest-assured/pom.xml index eeb5389f49..bd4c1456c1 100644 --- a/testing-modules/rest-assured/pom.xml +++ b/testing-modules/rest-assured/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 rest-assured 1.0 @@ -70,41 +71,34 @@ org.eclipse.jetty jetty-util - org.apache.httpcomponents httpcore - org.apache.commons commons-lang3 - com.github.fge uri-template ${uri-template.version} - com.googlecode.libphonenumber libphonenumber ${libphonenumber.version} - javax.mail mail ${javax.mail.version} - joda-time joda-time ${joda-time.version} - com.fasterxml.jackson.core jackson-annotations @@ -113,36 +107,30 @@ com.fasterxml.jackson.core jackson-databind - com.github.fge msg-simple ${msg-simple.version} - com.github.fge jackson-coreutils ${jackson-coreutils.version} - com.github.fge btf ${btf.version} - org.apache.httpcomponents httpclient - org.codehaus.groovy groovy-all ${groovy.version} - com.github.tomakehurst wiremock @@ -153,8 +141,7 @@ commons-collections ${commons-collections.version} - - + io.rest-assured rest-assured @@ -185,12 +172,9 @@ 2.5 1.4.7 9.4.0.v20161208 - 3.2.2 - 4.4.5 4.5.2 - 0.9 8.0.0 2.9.6 @@ -198,8 +182,7 @@ 1.2 2.4.7 2.4.1 - 2.5.3 - + \ No newline at end of file diff --git a/testing-modules/rest-testing/pom.xml b/testing-modules/rest-testing/pom.xml index b3966c1b6a..42e15f5199 100644 --- a/testing-modules/rest-testing/pom.xml +++ b/testing-modules/rest-testing/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 rest-testing 0.1-SNAPSHOT @@ -14,23 +15,18 @@ - - commons-io commons-io ${commons-io.version} - org.apache.commons commons-lang3 ${commons-lang3.version} - - org.apache.httpcomponents httpclient @@ -47,15 +43,12 @@ httpcore ${httpcore.version} - - com.fasterxml.jackson.core jackson-databind ${jackson.version} - com.github.tomakehurst @@ -63,7 +56,6 @@ ${wiremock.version} test - io.cucumber cucumber-java @@ -75,20 +67,17 @@ cucumber-junit ${cucumber.version} - org.jbehave jbehave-core ${jbehave.version} test - com.intuit.karate karate-apache ${karate.version} - com.intuit.karate karate-junit4 @@ -139,16 +128,13 @@ 19.0 - 2.9.0 6.8.0 2.21.0 0.6.1 - 4.4.5 4.5.2 - 4.1 diff --git a/testing-modules/selenium-junit-testng/pom.xml b/testing-modules/selenium-junit-testng/pom.xml index 8d661997f8..f06d47247c 100644 --- a/testing-modules/selenium-junit-testng/pom.xml +++ b/testing-modules/selenium-junit-testng/pom.xml @@ -67,4 +67,4 @@ 1.5.4 - + \ No newline at end of file diff --git a/testing-modules/spring-testing-2/pom.xml b/testing-modules/spring-testing-2/pom.xml index 40b556732a..419b8d512a 100644 --- a/testing-modules/spring-testing-2/pom.xml +++ b/testing-modules/spring-testing-2/pom.xml @@ -1,9 +1,7 @@ - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-testing-2 0.1-SNAPSHOT @@ -21,24 +19,20 @@ org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-data-jpa - com.h2database h2 ${h2.version} - org.postgresql postgresql runtime - org.testcontainers @@ -54,11 +48,10 @@ - + - + org.apache.maven.plugins maven-surefire-plugin @@ -74,4 +67,5 @@ 1.12.2 + \ No newline at end of file diff --git a/testing-modules/spring-testing/pom.xml b/testing-modules/spring-testing/pom.xml index 74d55d4c08..bf4c1e7a69 100644 --- a/testing-modules/spring-testing/pom.xml +++ b/testing-modules/spring-testing/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-testing 0.1-SNAPSHOT @@ -20,19 +20,16 @@ java-hamcrest ${java-hamcrest.version} - org.projectlombok lombok ${lombok.version} provided - org.springframework.boot spring-boot-starter - org.springframework.boot diff --git a/testing-modules/test-containers/pom.xml b/testing-modules/test-containers/pom.xml index 2280a89b4a..4a65611c7a 100644 --- a/testing-modules/test-containers/pom.xml +++ b/testing-modules/test-containers/pom.xml @@ -1,8 +1,8 @@ - + 4.0.0 - test-containers 1.0-SNAPSHOT @@ -92,4 +92,4 @@ 1.3.2 - + \ No newline at end of file diff --git a/testing-modules/testing-assertions/pom.xml b/testing-modules/testing-assertions/pom.xml index 8b8536462d..82a507a985 100644 --- a/testing-modules/testing-assertions/pom.xml +++ b/testing-modules/testing-assertions/pom.xml @@ -11,7 +11,7 @@ 0.0.1-SNAPSHOT ../../parent-java - + ch.qos.logback @@ -55,4 +55,5 @@ 4.4 5.6.2 - + + \ No newline at end of file diff --git a/testing-modules/testing-libraries-2/pom.xml b/testing-modules/testing-libraries-2/pom.xml index 7f96280cac..e7016a2387 100644 --- a/testing-modules/testing-libraries-2/pom.xml +++ b/testing-modules/testing-libraries-2/pom.xml @@ -43,7 +43,6 @@ ${system-stubs.version} test - org.junit.jupiter @@ -72,7 +71,7 @@ - testing-libraries + testing-libraries-2 src/test/resources @@ -88,4 +87,5 @@ 5.6.2 3.16.1 - + + \ No newline at end of file diff --git a/testing-modules/testing-libraries/pom.xml b/testing-modules/testing-libraries/pom.xml index 4edd13fa30..4bbe56fc18 100644 --- a/testing-modules/testing-libraries/pom.xml +++ b/testing-modules/testing-libraries/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 testing-libraries testing-libraries @@ -29,7 +30,6 @@ ${cucumber.version} test - io.cucumber cucumber-java8 @@ -63,7 +63,6 @@ true - org.apache.maven.plugins @@ -105,4 +104,4 @@ 2.4.3 - + \ No newline at end of file diff --git a/testing-modules/testng/pom.xml b/testing-modules/testng/pom.xml index c4a1284b0e..8b6a46a694 100644 --- a/testing-modules/testng/pom.xml +++ b/testing-modules/testng/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 testng 0.1.0-SNAPSHOT diff --git a/testing-modules/xmlunit-2/pom.xml b/testing-modules/xmlunit-2/pom.xml index 5689e680e6..07153ab042 100644 --- a/testing-modules/xmlunit-2/pom.xml +++ b/testing-modules/xmlunit-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 xmlunit-2 xmlunit-2 @@ -30,4 +31,4 @@ 2.3.0 - + \ No newline at end of file diff --git a/testing-modules/zerocode/pom.xml b/testing-modules/zerocode/pom.xml index 63f0dc9cbb..48030166b5 100644 --- a/testing-modules/zerocode/pom.xml +++ b/testing-modules/zerocode/pom.xml @@ -1,30 +1,29 @@ - + 4.0.0 + zerocode + 1.0-SNAPSHOT + testing-modules com.baeldung 1.0.0-SNAPSHOT - zerocode - 1.0-SNAPSHOT - org.springframework.boot spring-boot-starter-web ${spring.boot.version} - org.springframework.boot spring-boot-starter-test ${spring.boot.version} test - - org.jsmart zerocode-tdd @@ -64,7 +63,6 @@ - org.apache.maven.plugins maven-failsafe-plugin @@ -101,4 +99,4 @@ 1.3.27 - + \ No newline at end of file From d1e8164581e6c13331c1178cfbb04cc5c82b4325 Mon Sep 17 00:00:00 2001 From: Bhabani Prasad Patel Date: Mon, 17 May 2021 23:46:45 +0530 Subject: [PATCH 08/28] Code commit for "Converting String to BigDecimal in Java" - Article (#10775) --- .../StringToBigDecimalConversionUnitTest.java | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java diff --git a/core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java b/core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java new file mode 100644 index 0000000000..e951b393c2 --- /dev/null +++ b/core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java @@ -0,0 +1,74 @@ +package com.baeldung.stringtobigdecimal; + +import static org.junit.Assert.assertEquals; + +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.ParseException; + +import org.junit.Test; + +public class StringToBigDecimalConversionUnitTest { + + @Test + public void givenValidString_WhenBigDecimalObjectWithStringParameter_ThenResultIsDecimalObject() { + BigDecimal bigDecimal = new BigDecimal(123); + assertEquals(bigDecimal, new BigDecimal("123")); + } + + @Test(expected = NullPointerException.class) + public void givenNullString_WhenBigDecimalObjectWithStringParameter_ThenNullPointerExceptionIsThrown() { + String bigDecimal = null; + new BigDecimal(bigDecimal); + } + + @Test(expected = NumberFormatException.class) + public void givenInalidString_WhenBigDecimalObjectWithStringParameter_ThenNumberFormatExceptionIsThrown() { + new BigDecimal("&"); + } + + @Test + public void givenValidString_WhenValueOfDoubleFromString_ThenResultIsDecimalObject() { + BigDecimal bigDecimal = new BigDecimal(123.42).setScale(2, BigDecimal.ROUND_HALF_UP); + assertEquals(bigDecimal, BigDecimal.valueOf(Double.valueOf("123.42"))); + } + + @Test(expected = NullPointerException.class) + public void givenNullString_WhenValueOfDoubleFromString_ThenNullPointerExceptionIsThrown() { + BigDecimal.valueOf(Double.valueOf(null)); + } + + @Test(expected = NumberFormatException.class) + public void givenInalidString_WhenValueOfDoubleFromString_ThenNumberFormatExceptionIsThrown() { + BigDecimal.valueOf(Double.valueOf("&")); + } + + @Test + public void givenValidString_WhenDecimalFormatOfString_ThenResultIsDecimalObject() throws ParseException { + BigDecimal bigDecimal = new BigDecimal(10692467440017.111).setScale(3, BigDecimal.ROUND_HALF_UP); + + DecimalFormatSymbols symbols = new DecimalFormatSymbols(); + symbols.setGroupingSeparator(','); + symbols.setDecimalSeparator('.'); + String pattern = "#,##0.0#"; + DecimalFormat decimalFormat = new DecimalFormat(pattern, symbols); + decimalFormat.setParseBigDecimal(true); + + // parse the string value + BigDecimal parsedStringValue = (BigDecimal) decimalFormat.parse("10,692,467,440,017.111"); + + assertEquals(bigDecimal, parsedStringValue); + } + + @Test(expected = NullPointerException.class) + public void givenNullString_WhenDecimalFormatOfString_ThenNullPointerExceptionIsThrown() throws ParseException { + new DecimalFormat("#").parse(null); + } + + @Test(expected = ParseException.class) + public void givenInalidString_WhenDecimalFormatOfString_ThenNumberFormatExceptionIsThrown() throws ParseException { + new DecimalFormat("#").parse("&"); + } + +} From 10346cd9d77cefc3d3d7955b4bef3a11b0ca3c87 Mon Sep 17 00:00:00 2001 From: Ali Dehghani Date: Tue, 18 May 2021 01:57:48 +0430 Subject: [PATCH 09/28] Fixed the wrong assertion issue in a test --- .../reactive/logging/WebClientLoggingIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-5-reactive-client/src/test/java/com/baeldung/reactive/logging/WebClientLoggingIntegrationTest.java b/spring-5-reactive-client/src/test/java/com/baeldung/reactive/logging/WebClientLoggingIntegrationTest.java index bb4e682481..dabfd22056 100644 --- a/spring-5-reactive-client/src/test/java/com/baeldung/reactive/logging/WebClientLoggingIntegrationTest.java +++ b/spring-5-reactive-client/src/test/java/com/baeldung/reactive/logging/WebClientLoggingIntegrationTest.java @@ -146,7 +146,7 @@ public class WebClientLoggingIntegrationTest { .exchange() .block(); - verify(mockAppender).doAppend(argThat(argument -> (((LoggingEvent) argument).getFormattedMessage()).contains("domain=.typicode.com;"))); + verify(mockAppender).doAppend(argThat(argument -> (((LoggingEvent) argument).getFormattedMessage()).contains(sampleUrl))); } From 1506fdef1f08e93e932a93efd4dfa7c5f733b7ea Mon Sep 17 00:00:00 2001 From: uzma khan Date: Sat, 15 May 2021 18:31:23 +0100 Subject: [PATCH 10/28] [BAEL-4829] Multipart request in spring --- .../spring-mvc-forms-thymeleaf/pom.xml | 5 ++ .../baeldung/multipartupload/Employee.java | 16 ++++++ .../multipartupload/EmployeeController.java | 49 ++++++++++++++++ .../multipartupload/EmployeeRepository.java | 8 +++ .../multipartupload/EmployeeService.java | 36 ++++++++++++ .../MultipartUploadApplication.java | 13 +++++ .../employee/createEmployeeForm.html | 16 ++++++ .../resources/templates/employee/success.html | 8 +++ .../EmployeeControllerIntegrationTest.java | 56 +++++++++++++++++++ 9 files changed, 207 insertions(+) create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/Employee.java create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeController.java create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeRepository.java create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeService.java create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/MultipartUploadApplication.java create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/createEmployeeForm.html create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/success.html create mode 100644 spring-web-modules/spring-mvc-forms-thymeleaf/src/test/java/com/baeldung/multipartupload/EmployeeControllerIntegrationTest.java diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml b/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml index fdd569d144..37bcee0b8d 100644 --- a/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/pom.xml @@ -24,6 +24,11 @@ org.springframework.boot spring-boot-starter-thymeleaf + + org.projectlombok + lombok + + org.springframework.boot diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/Employee.java b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/Employee.java new file mode 100644 index 0000000000..0bc600dd6a --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/Employee.java @@ -0,0 +1,16 @@ +package com.baeldung.multipartupload; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.web.multipart.MultipartFile; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class Employee { + private String name; + private MultipartFile document; +} diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeController.java b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeController.java new file mode 100644 index 0000000000..e02844233e --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeController.java @@ -0,0 +1,49 @@ +package com.baeldung.multipartupload; + +import lombok.AllArgsConstructor; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import static org.springframework.web.bind.annotation.RequestMethod.POST; + +@Controller +@AllArgsConstructor +public class EmployeeController { + + private final EmployeeService employeeService; + + @GetMapping(value = "/employee") + public String showEmployeeForm(Model model) { + model.addAttribute("employee", new Employee()); + return "employee/createEmployeeForm"; + } + + @RequestMapping(path = "/employee", method = POST, consumes = { MediaType.MULTIPART_FORM_DATA_VALUE }) + public String saveEmployee(@ModelAttribute Employee employee) { + employeeService.save(employee); + return "employee/success"; + } + + @RequestMapping(path = "/requestpart/employee", method = POST, consumes = { MediaType.MULTIPART_FORM_DATA_VALUE }) + public ResponseEntity saveEmployee(@RequestPart Employee employee, @RequestPart MultipartFile document) { + employee.setDocument(document); + employeeService.save(employee); + return ResponseEntity.ok().build(); + } + + @RequestMapping(path = "/requestparam/employee", method = POST, consumes = { MediaType.MULTIPART_FORM_DATA_VALUE }) + public ResponseEntity saveEmployee(@RequestParam String name, @RequestPart MultipartFile document) { + Employee employee = new Employee(name, document); + employeeService.save(employee); + return ResponseEntity.ok().build(); + } + +} \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeRepository.java b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeRepository.java new file mode 100644 index 0000000000..d4182e100d --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeRepository.java @@ -0,0 +1,8 @@ +package com.baeldung.multipartupload; + +import org.springframework.stereotype.Repository; + +@Repository +public interface EmployeeRepository { + void saveEmployee(Employee employee); +} \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeService.java b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeService.java new file mode 100644 index 0000000000..f6906c8ba9 --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/EmployeeService.java @@ -0,0 +1,36 @@ +package com.baeldung.multipartupload; + +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.file.Files; + +@Service +public class EmployeeService { + + public void save(Employee employee) { + saveFile(employee.getDocument()); + // save other employee data + } + + private void saveFile(MultipartFile multipartFile) { + try { + saveToFilesystem(multipartFile); + } catch (Exception e) { + throw new RuntimeException("Unable to save file", e); + } + } + + private static void saveToFilesystem(MultipartFile multipartFile) throws IOException { + String dir = Files.createTempDirectory("tmpDir").toFile().getAbsolutePath(); + File file = new File(dir + File.pathSeparator + multipartFile.getName()); + + try (OutputStream os = new FileOutputStream(file)) { + os.write(multipartFile.getBytes()); + } + } +} diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/MultipartUploadApplication.java b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/MultipartUploadApplication.java new file mode 100644 index 0000000000..299a5c2325 --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/java/com/baeldung/multipartupload/MultipartUploadApplication.java @@ -0,0 +1,13 @@ +package com.baeldung.multipartupload; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class MultipartUploadApplication { + + public static void main(String[] args) { + SpringApplication.run(MultipartUploadApplication.class, args); + } + +} diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/createEmployeeForm.html b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/createEmployeeForm.html new file mode 100644 index 0000000000..c88a8b9318 --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/createEmployeeForm.html @@ -0,0 +1,16 @@ + + + + Getting Started: Handling Form Submission + + + +

Form

+
+

name:

+

document: + +

+
+ + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/success.html b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/success.html new file mode 100644 index 0000000000..2a49c01613 --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/main/resources/templates/employee/success.html @@ -0,0 +1,8 @@ + + + + + + Employee data submitted. + + \ No newline at end of file diff --git a/spring-web-modules/spring-mvc-forms-thymeleaf/src/test/java/com/baeldung/multipartupload/EmployeeControllerIntegrationTest.java b/spring-web-modules/spring-mvc-forms-thymeleaf/src/test/java/com/baeldung/multipartupload/EmployeeControllerIntegrationTest.java new file mode 100644 index 0000000000..73cf905a34 --- /dev/null +++ b/spring-web-modules/spring-mvc-forms-thymeleaf/src/test/java/com/baeldung/multipartupload/EmployeeControllerIntegrationTest.java @@ -0,0 +1,56 @@ +package com.baeldung.multipartupload; + +import org.junit.jupiter.api.Test; +import org.mockito.BDDMockito; +import org.mockito.Mockito; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.mock.web.MockMultipartFile; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; + +import static org.apache.http.entity.ContentType.DEFAULT_BINARY; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@WebMvcTest +@EnableWebMvc +public class EmployeeControllerIntegrationTest { + + private static final MockMultipartFile A_FILE = new MockMultipartFile("document", null, DEFAULT_BINARY.toString(), "Employee Record".getBytes()); + + @Autowired + private MockMvc mockMvc; + + @MockBean + private EmployeeService employeeService; + + @Test + public void givenFormData_whenPost_thenReturns200OK() throws Exception { + + mockMvc.perform(multipart("/employee") + .file(A_FILE) + .param("name", "testname")) + .andExpect(status().isOk()); + } + + @Test + public void givenEmployeeJsonAndMultipartFile_whenPostWithRequestPart_thenReturnsOK() throws Exception { + MockMultipartFile employeeJson = new MockMultipartFile("employee", null, + "application/json", "{\"name\": \"Emp Name\"}".getBytes()); + + mockMvc.perform(multipart("/requestpart/employee") + .file(A_FILE) + .file(employeeJson)) + .andExpect(status().isOk()); + } + + @Test + public void givenRequestPartAndRequestParam_whenPost_thenReturns200OK() throws Exception { + mockMvc.perform(multipart("/requestparam/employee") + .file(A_FILE) + .param("name", "testname")) + .andExpect(status().isOk()); + } +} \ No newline at end of file From 3f3adc726e7352d5dd4faed9fc19e18a9de9d9ba Mon Sep 17 00:00:00 2001 From: Bhabani Prasad Patel Date: Wed, 19 May 2021 08:34:43 +0530 Subject: [PATCH 11/28] Please override with the latest change (#10780) * Code commit for "Converting String to BigDecimal in Java" - Article * modified the assert param for comparing actual and expected values * removed the conflict change --- .../StringToBigDecimalConversionUnitTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java b/core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java index e951b393c2..cd8ef6c70f 100644 --- a/core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java +++ b/core-java-modules/core-java-string-conversions-2/src/test/java/com/baeldung/stringtobigdecimal/StringToBigDecimalConversionUnitTest.java @@ -13,8 +13,8 @@ public class StringToBigDecimalConversionUnitTest { @Test public void givenValidString_WhenBigDecimalObjectWithStringParameter_ThenResultIsDecimalObject() { - BigDecimal bigDecimal = new BigDecimal(123); - assertEquals(bigDecimal, new BigDecimal("123")); + BigDecimal bigDecimal = new BigDecimal("123"); + assertEquals(new BigDecimal(123), bigDecimal); } @Test(expected = NullPointerException.class) @@ -30,8 +30,8 @@ public class StringToBigDecimalConversionUnitTest { @Test public void givenValidString_WhenValueOfDoubleFromString_ThenResultIsDecimalObject() { - BigDecimal bigDecimal = new BigDecimal(123.42).setScale(2, BigDecimal.ROUND_HALF_UP); - assertEquals(bigDecimal, BigDecimal.valueOf(Double.valueOf("123.42"))); + BigDecimal bigDecimal = BigDecimal.valueOf(Double.valueOf("123.42")); + assertEquals(new BigDecimal(123.42).setScale(2, BigDecimal.ROUND_HALF_UP), bigDecimal); } @Test(expected = NullPointerException.class) From dda696ff4a3b16a6c66bb7df20c231f75565b7f4 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:05:57 +0800 Subject: [PATCH 12/28] Update README.md --- core-java-modules/core-java-11-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-11-2/README.md b/core-java-modules/core-java-11-2/README.md index c87936b07d..ca9a306b82 100644 --- a/core-java-modules/core-java-11-2/README.md +++ b/core-java-modules/core-java-11-2/README.md @@ -7,3 +7,4 @@ This module contains articles about Java 11 core features - [Guide to Java Reflection](http://www.baeldung.com/java-reflection) - [Guide to Java 8’s Collectors](https://www.baeldung.com/java-8-collectors) - [New Features in Java 11](https://www.baeldung.com/java-11-new-features) +- [Getting the Java Version at Runtime](https://www.baeldung.com/get-java-version-runtime) From cc8fc1843aca6ca991203a15b377aea32868eda4 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:07:46 +0800 Subject: [PATCH 13/28] Update README.md --- core-java-modules/core-java-lang-oop-patterns/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-oop-patterns/README.md b/core-java-modules/core-java-lang-oop-patterns/README.md index 178a556a96..df68a1413a 100644 --- a/core-java-modules/core-java-lang-oop-patterns/README.md +++ b/core-java-modules/core-java-lang-oop-patterns/README.md @@ -7,3 +7,4 @@ This module contains articles about Object-oriented programming (OOP) patterns i - [Inheritance and Composition (Is-a vs Has-a relationship) in Java](https://www.baeldung.com/java-inheritance-composition) - [Immutable Objects in Java](https://www.baeldung.com/java-immutable-object) - [How to Make a Deep Copy of an Object in Java](https://www.baeldung.com/java-deep-copy) +- [Using an Interface vs. Abstract Class in Java](https://www.baeldung.com/java-interface-vs-abstract-class) From 488df183045fda511d15319875cb4c4be5d09187 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:11:05 +0800 Subject: [PATCH 14/28] Update README.md --- core-java-modules/core-java-lang-4/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-4/README.md b/core-java-modules/core-java-lang-4/README.md index 8b8dff4bd1..e1023513eb 100644 --- a/core-java-modules/core-java-lang-4/README.md +++ b/core-java-modules/core-java-lang-4/README.md @@ -5,3 +5,4 @@ This module contains articles about core features in the Java language - [The Java final Keyword – Impact on Performance](https://www.baeldung.com/java-final-performance) - [The package-info.java File](https://www.baeldung.com/java-package-info) - [What are Compile-time Constants in Java?](https://www.baeldung.com/java-compile-time-constants) +- [Java Objects.hash() vs Objects.hashCode()](https://www.baeldung.com/java-objects-hash-vs-objects-hashcode) From 3a8f904a345c16a34c7f7e5e66b34e779d838931 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:12:58 +0800 Subject: [PATCH 15/28] Create README.md --- maven-modules/maven-copy-files/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 maven-modules/maven-copy-files/README.md diff --git a/maven-modules/maven-copy-files/README.md b/maven-modules/maven-copy-files/README.md new file mode 100644 index 0000000000..1e3a75cb0b --- /dev/null +++ b/maven-modules/maven-copy-files/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Copying Files With Maven](https://www.baeldung.com/maven-copy-files) From 3f830fb1667260680276ab87a90eb02fca3aebe7 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:14:56 +0800 Subject: [PATCH 16/28] Update README.md --- core-java-modules/core-java-streams-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-streams-3/README.md b/core-java-modules/core-java-streams-3/README.md index 26b4dfe975..48ebf145d2 100644 --- a/core-java-modules/core-java-streams-3/README.md +++ b/core-java-modules/core-java-streams-3/README.md @@ -12,4 +12,5 @@ This module contains articles about the Stream API in Java. - [Should We Close a Java Stream?](https://www.baeldung.com/java-stream-close) - [Returning Stream vs. Collection](https://www.baeldung.com/java-return-stream-collection) - [Convert a Java Enumeration Into a Stream](https://www.baeldung.com/java-enumeration-to-stream) +- [When to Use a Parallel Stream in Java](https://www.baeldung.com/java-when-to-use-parallel-stream) - More articles: [[<-- prev>]](/../core-java-streams-2) From 823ec61b410f2d1a8fc8d45fe45be564442efe16 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:16:34 +0800 Subject: [PATCH 17/28] Update README.md --- persistence-modules/java-jpa-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/java-jpa-3/README.md b/persistence-modules/java-jpa-3/README.md index 9c9e040825..e607043880 100644 --- a/persistence-modules/java-jpa-3/README.md +++ b/persistence-modules/java-jpa-3/README.md @@ -10,3 +10,4 @@ This module contains articles about the Java Persistence API (JPA) in Java. - [JPA CascadeType.REMOVE vs orphanRemoval](https://www.baeldung.com/jpa-cascade-remove-vs-orphanremoval) - [A Guide to MultipleBagFetchException in Hibernate](https://www.baeldung.com/java-hibernate-multiplebagfetchexception) - [How to Convert a Hibernate Proxy to a Real Entity Object](https://www.baeldung.com/hibernate-proxy-to-real-entity-object) +- [Returning an Auto-Generated Id with JPA](https://www.baeldung.com/jpa-get-auto-generated-id) From 9929ffc1cceaa29ad08bec81a1bfa0de47f1cf8b Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:17:47 +0800 Subject: [PATCH 18/28] Update README.md --- testing-modules/testing-libraries-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/testing-modules/testing-libraries-2/README.md b/testing-modules/testing-libraries-2/README.md index f8361904b8..868d8f307d 100644 --- a/testing-modules/testing-libraries-2/README.md +++ b/testing-modules/testing-libraries-2/README.md @@ -2,3 +2,4 @@ - [Guide to the System Rules Library](https://www.baeldung.com/java-system-rules-junit) - [Guide to the System Stubs Library](https://www.baeldung.com/java-system-stubs) +- [Code Coverage with SonarQube and JaCoCo](https://www.baeldung.com/sonarqube-jacoco-code-coverage) From cbd8cee5b419a9d679aaa12c5b2daa6da262d325 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:20:46 +0800 Subject: [PATCH 19/28] Update README.md --- spring-boot-modules/spring-boot-mvc-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-modules/spring-boot-mvc-3/README.md b/spring-boot-modules/spring-boot-mvc-3/README.md index bc3eb9e496..f9c6989b3c 100644 --- a/spring-boot-modules/spring-boot-mvc-3/README.md +++ b/spring-boot-modules/spring-boot-mvc-3/README.md @@ -9,4 +9,5 @@ This module contains articles about Spring Web MVC in Spring Boot projects. - [Spring MVC Async vs Spring WebFlux](https://www.baeldung.com/spring-mvc-async-vs-webflux) - [Differences in @Valid and @Validated Annotations in Spring](https://www.baeldung.com/spring-valid-vs-validated) - [CharacterEncodingFilter In SpringBoot](https://www.baeldung.com/spring-boot-characterencodingfilter) +- [HandlerInterceptors vs. Filters in Spring MVC](https://www.baeldung.com/spring-mvc-handlerinterceptor-vs-filter) - More articles: [[prev -->]](/spring-boot-modules/spring-boot-mvc-2) From f04dd12217de5efb6127691d118845338f9a00e9 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:22:21 +0800 Subject: [PATCH 20/28] Update README.md --- core-java-modules/core-java-string-operations-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-string-operations-3/README.md b/core-java-modules/core-java-string-operations-3/README.md index bc4af852ed..ad4ada3a68 100644 --- a/core-java-modules/core-java-string-operations-3/README.md +++ b/core-java-modules/core-java-string-operations-3/README.md @@ -3,3 +3,4 @@ - [Version Comparison in Java](https://www.baeldung.com/java-comparing-versions) - [Java (String) or .toString()?](https://www.baeldung.com/java-string-casting-vs-tostring) - [Split Java String by Newline](https://www.baeldung.com/java-string-split-by-newline) +- [Split a String in Java and Keep the Delimiters](https://www.baeldung.com/java-split-string-keep-delimiters) From 90c4e239321c72b060b3e5f788c55e7fb6a9198a Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:25:36 +0800 Subject: [PATCH 21/28] Update README.md --- persistence-modules/spring-data-jpa-annotations/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/spring-data-jpa-annotations/README.md b/persistence-modules/spring-data-jpa-annotations/README.md index 3892e75733..5a5440b1ed 100644 --- a/persistence-modules/spring-data-jpa-annotations/README.md +++ b/persistence-modules/spring-data-jpa-annotations/README.md @@ -9,6 +9,7 @@ This module contains articles about annotations used in Spring Data JPA - [Spring JPA @Embedded and @EmbeddedId](https://www.baeldung.com/spring-jpa-embedded-method-parameters) - [Programmatic Transaction Management in Spring](https://www.baeldung.com/spring-programmatic-transaction-management) - [JPA Entity Lifecycle Events](https://www.baeldung.com/jpa-entity-lifecycle-events) +- [Overriding Column Definition With @AttributeOverride](https://www.baeldung.com/jpa-attributeoverride) ### Eclipse Config After importing the project into Eclipse, you may see the following error: From e8c0d7bf5325ce671e879d10a44c0dccfdf801f0 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:27:41 +0800 Subject: [PATCH 22/28] Update README.md --- spring-boot-modules/spring-boot-cassandre/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-modules/spring-boot-cassandre/README.md b/spring-boot-modules/spring-boot-cassandre/README.md index 14ffbb7d6b..4dfef587db 100644 --- a/spring-boot-modules/spring-boot-cassandre/README.md +++ b/spring-boot-modules/spring-boot-cassandre/README.md @@ -8,4 +8,4 @@ This project is an example of a trading bot developed with Cassandre * `mvn spring-boot:run` - Run the bot ## Relevant Articles -- [Build a Trading Bot with Cassandre Spring Boot Starter](https://www.baeldung.com/build-a-trading-bot-with-cassandre-spring-boot-starter/) +- [Build a Trading Bot with Cassandre Spring Boot Starter](https://www.baeldung.com/cassandre-spring-boot-trading-bot) From 56d69f922ba5a9b293e4b5833881aaf53cc868f4 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Wed, 19 May 2021 22:59:16 +0530 Subject: [PATCH 23/28] JAVA-2419: Move/rename module spring-boot-xml --- spring-boot-modules/pom.xml | 1 - .../README.md | 1 + .../spring-boot-basic-customization-2/pom.xml | 5 ++- .../java/com/baeldung/springbootxml/Pojo.java | 0 .../SpringBootXmlApplication.java | 0 .../src/main/resources/application.properties | 1 + .../src/main/resources/beans.xml | 0 ...ringBootXmlApplicationIntegrationTest.java | 1 + spring-boot-modules/spring-boot-xml/README.md | 3 -- spring-boot-modules/spring-boot-xml/pom.xml | 39 ------------------- .../src/main/resources/application.properties | 1 - 11 files changed, 7 insertions(+), 45 deletions(-) rename spring-boot-modules/{spring-boot-xml => spring-boot-basic-customization-2}/src/main/java/com/baeldung/springbootxml/Pojo.java (100%) rename spring-boot-modules/{spring-boot-xml => spring-boot-basic-customization-2}/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java (100%) rename spring-boot-modules/{spring-boot-xml => spring-boot-basic-customization-2}/src/main/resources/beans.xml (100%) rename spring-boot-modules/{spring-boot-xml/src/main/java => spring-boot-basic-customization-2/src/main/test}/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java (99%) delete mode 100644 spring-boot-modules/spring-boot-xml/README.md delete mode 100644 spring-boot-modules/spring-boot-xml/pom.xml delete mode 100644 spring-boot-modules/spring-boot-xml/src/main/resources/application.properties diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml index 7c94d5b7d7..53af0de315 100644 --- a/spring-boot-modules/pom.xml +++ b/spring-boot-modules/pom.xml @@ -70,7 +70,6 @@ spring-boot-swagger-jwt spring-boot-testing spring-boot-vue - spring-boot-xml spring-boot-actuator spring-boot-data-2 spring-boot-react diff --git a/spring-boot-modules/spring-boot-basic-customization-2/README.md b/spring-boot-modules/spring-boot-basic-customization-2/README.md index bf7e4abb76..f041c1d38a 100644 --- a/spring-boot-modules/spring-boot-basic-customization-2/README.md +++ b/spring-boot-modules/spring-boot-basic-customization-2/README.md @@ -5,3 +5,4 @@ This module contains articles about Spring Boot customization 2 ### Relevant Articles: - [DispatcherServlet and web.xml in Spring Boot](https://www.baeldung.com/spring-boot-dispatcherservlet-web-xml) + - [XML Defined Beans in Spring Boot](https://www.baeldung.com/spring-boot-xml-beans) \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-basic-customization-2/pom.xml b/spring-boot-modules/spring-boot-basic-customization-2/pom.xml index d42a7fd3de..8c1bc22600 100644 --- a/spring-boot-modules/spring-boot-basic-customization-2/pom.xml +++ b/spring-boot-modules/spring-boot-basic-customization-2/pom.xml @@ -23,7 +23,10 @@ org.springframework.boot spring-boot-starter-test - test + + + junit + junit diff --git a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/Pojo.java b/spring-boot-modules/spring-boot-basic-customization-2/src/main/java/com/baeldung/springbootxml/Pojo.java similarity index 100% rename from spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/Pojo.java rename to spring-boot-modules/spring-boot-basic-customization-2/src/main/java/com/baeldung/springbootxml/Pojo.java diff --git a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java b/spring-boot-modules/spring-boot-basic-customization-2/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java similarity index 100% rename from spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java rename to spring-boot-modules/spring-boot-basic-customization-2/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplication.java diff --git a/spring-boot-modules/spring-boot-basic-customization-2/src/main/resources/application.properties b/spring-boot-modules/spring-boot-basic-customization-2/src/main/resources/application.properties index e69de29bb2..ab9de92c82 100644 --- a/spring-boot-modules/spring-boot-basic-customization-2/src/main/resources/application.properties +++ b/spring-boot-modules/spring-boot-basic-customization-2/src/main/resources/application.properties @@ -0,0 +1 @@ +sample=string loaded from properties! \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-xml/src/main/resources/beans.xml b/spring-boot-modules/spring-boot-basic-customization-2/src/main/resources/beans.xml similarity index 100% rename from spring-boot-modules/spring-boot-xml/src/main/resources/beans.xml rename to spring-boot-modules/spring-boot-basic-customization-2/src/main/resources/beans.xml diff --git a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-basic-customization-2/src/main/test/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java similarity index 99% rename from spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-basic-customization-2/src/main/test/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java index 2c3993d0d8..f3060de82a 100644 --- a/spring-boot-modules/spring-boot-xml/src/main/java/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java +++ b/spring-boot-modules/spring-boot-basic-customization-2/src/main/test/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java @@ -1,5 +1,6 @@ package com.baeldung.springbootxml; + import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-boot-modules/spring-boot-xml/README.md b/spring-boot-modules/spring-boot-xml/README.md deleted file mode 100644 index 7a9a0bdc09..0000000000 --- a/spring-boot-modules/spring-boot-xml/README.md +++ /dev/null @@ -1,3 +0,0 @@ -### Relevant Articles: - -- [XML Defined Beans in Spring Boot](https://www.baeldung.com/spring-boot-xml-beans) diff --git a/spring-boot-modules/spring-boot-xml/pom.xml b/spring-boot-modules/spring-boot-xml/pom.xml deleted file mode 100644 index b3fd343e4f..0000000000 --- a/spring-boot-modules/spring-boot-xml/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - spring-boot-xml - - - parent-boot-2 - com.baeldung - 0.0.1-SNAPSHOT - ../../parent-boot-2 - - - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-test - - - junit - junit - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-xml/src/main/resources/application.properties b/spring-boot-modules/spring-boot-xml/src/main/resources/application.properties deleted file mode 100644 index ab9de92c82..0000000000 --- a/spring-boot-modules/spring-boot-xml/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -sample=string loaded from properties! \ No newline at end of file From 11941b70a1167d07c4a21e44f999b989d7d3f1f6 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:30:51 +0800 Subject: [PATCH 24/28] Update README.md --- core-java-modules/core-java-string-conversions-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-string-conversions-2/README.md b/core-java-modules/core-java-string-conversions-2/README.md index afdd7e5760..3bd3ba927e 100644 --- a/core-java-modules/core-java-string-conversions-2/README.md +++ b/core-java-modules/core-java-string-conversions-2/README.md @@ -6,4 +6,5 @@ This module contains articles about string conversions from/to another type. - [Java String Conversions](https://www.baeldung.com/java-string-conversions) - [Convert String to Byte Array and Reverse in Java](https://www.baeldung.com/java-string-to-byte-array) - [Convert Character Array to String in Java](https://www.baeldung.com/java-char-array-to-string) +- [Converting String to BigDecimal in Java](https://www.baeldung.com/java-string-to-bigdecimal) - More articles: [[<-- prev]](/core-java-string-conversions) From a281d31d1ba51554ede0e44149bec423850321bb Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Thu, 20 May 2021 01:32:52 +0800 Subject: [PATCH 25/28] Update README.md --- persistence-modules/spring-data-jpa-crud/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/spring-data-jpa-crud/README.md b/persistence-modules/spring-data-jpa-crud/README.md index dc0c78c87e..81559bb773 100644 --- a/persistence-modules/spring-data-jpa-crud/README.md +++ b/persistence-modules/spring-data-jpa-crud/README.md @@ -10,6 +10,7 @@ This module contains articles about CRUD operations in Spring Data JPA - [Batch Insert/Update with Hibernate/JPA](https://www.baeldung.com/jpa-hibernate-batch-insert-update) - [Difference Between save() and saveAndFlush() in Spring Data JPA](https://www.baeldung.com/spring-data-jpa-save-saveandflush) - [Generate Database Schema with Spring Data JPA](https://www.baeldung.com/spring-data-jpa-generate-db-schema) +- [How to Implement a Soft Delete with Spring JPA](https://www.baeldung.com/spring-jpa-soft-delete) ### Eclipse Config After importing the project into Eclipse, you may see the following error: From 270034a046f7c07a69713d14de15f469e0804033 Mon Sep 17 00:00:00 2001 From: makapszenna <66560584+makapszenna@users.noreply.github.com> Date: Thu, 20 May 2021 03:27:09 +0200 Subject: [PATCH 26/28] BAEL-4796 How to display a message in Maven - improvement (#10779) Co-authored-by: Adrianna Zychewicz --- maven-modules/maven-printing-plugins/pom.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/maven-modules/maven-printing-plugins/pom.xml b/maven-modules/maven-printing-plugins/pom.xml index 6ea1ab2a84..805c3c1633 100644 --- a/maven-modules/maven-printing-plugins/pom.xml +++ b/maven-modules/maven-printing-plugins/pom.xml @@ -49,9 +49,11 @@ echo - Hello, world - Embed a line break: ${line.separator} - ArtifactId is ${project.artifactId} + + Hello, world + Embed a line break: ${line.separator} + ArtifactId is ${project.artifactId} + INFO /logs/log-echo.txt true From 8ee60907ea91867d377f2282df194246dbe36863 Mon Sep 17 00:00:00 2001 From: KevinGilmore Date: Wed, 19 May 2021 20:27:34 -0500 Subject: [PATCH 27/28] BAEL-4636: add link back to article (#10787) --- testing-modules/testing-libraries-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/testing-modules/testing-libraries-2/README.md b/testing-modules/testing-libraries-2/README.md index f8361904b8..868d8f307d 100644 --- a/testing-modules/testing-libraries-2/README.md +++ b/testing-modules/testing-libraries-2/README.md @@ -2,3 +2,4 @@ - [Guide to the System Rules Library](https://www.baeldung.com/java-system-rules-junit) - [Guide to the System Stubs Library](https://www.baeldung.com/java-system-stubs) +- [Code Coverage with SonarQube and JaCoCo](https://www.baeldung.com/sonarqube-jacoco-code-coverage) From 31f40d862359b24a45c02a15c6c8a7a282ee4fae Mon Sep 17 00:00:00 2001 From: kwoyke Date: Fri, 21 May 2021 07:16:08 +0200 Subject: [PATCH 28/28] "BAEL-3407: Add examples for injecting Spring components in MapStruct" (#10778) Co-authored-by: Krzysztof Woyke --- ...DestinationMapperUsingInjectedService.java | 22 ++++++++++++ .../com/baeldung/service/SimpleService.java | 11 ++++++ ...ionMapperUsingInjectedIntegrationTest.java | 35 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 mapstruct/src/main/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedService.java create mode 100644 mapstruct/src/main/java/com/baeldung/service/SimpleService.java create mode 100644 mapstruct/src/test/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedIntegrationTest.java diff --git a/mapstruct/src/main/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedService.java b/mapstruct/src/main/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedService.java new file mode 100644 index 0000000000..22e6499711 --- /dev/null +++ b/mapstruct/src/main/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedService.java @@ -0,0 +1,22 @@ +package com.baeldung.mapper; + +import com.baeldung.dto.SimpleSource; +import com.baeldung.entity.SimpleDestination; +import com.baeldung.service.SimpleService; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.springframework.beans.factory.annotation.Autowired; + +@Mapper(componentModel = "spring") +public abstract class SimpleDestinationMapperUsingInjectedService { + + @Autowired + protected SimpleService simpleService; + + @Mapping(target = "name", expression = "java(simpleService.enrichName(source.getName()))") + public abstract SimpleDestination sourceToDestination(SimpleSource source); + + public abstract SimpleSource destinationToSource(SimpleDestination destination); + + +} diff --git a/mapstruct/src/main/java/com/baeldung/service/SimpleService.java b/mapstruct/src/main/java/com/baeldung/service/SimpleService.java new file mode 100644 index 0000000000..14b6c09592 --- /dev/null +++ b/mapstruct/src/main/java/com/baeldung/service/SimpleService.java @@ -0,0 +1,11 @@ +package com.baeldung.service; + +import org.springframework.stereotype.Service; + +@Service +public class SimpleService { + + public String enrichName(String name) { + return "-:: " + name + " ::-"; + } +} diff --git a/mapstruct/src/test/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedIntegrationTest.java b/mapstruct/src/test/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedIntegrationTest.java new file mode 100644 index 0000000000..3bfbc60de6 --- /dev/null +++ b/mapstruct/src/test/java/com/baeldung/mapper/SimpleDestinationMapperUsingInjectedIntegrationTest.java @@ -0,0 +1,35 @@ +package com.baeldung.mapper; + +import com.baeldung.dto.SimpleSource; +import com.baeldung.entity.SimpleDestination; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("classpath:applicationContext.xml") +public class SimpleDestinationMapperUsingInjectedIntegrationTest { + + @Autowired + private SimpleDestinationMapperUsingInjectedService mapper; + + @Test + public void givenSourceToDestination_whenMaps_thenNameEnriched() { + // Given + SimpleSource source = new SimpleSource(); + source.setName("Bob"); + source.setDescription("The Builder"); + + // When + SimpleDestination destination = mapper.sourceToDestination(source); + + // Then + assertThat(destination).isNotNull(); + assertThat(destination.getName()).isEqualTo("-:: Bob ::-"); + assertThat(destination.getDescription()).isEqualTo("The Builder"); + } +} \ No newline at end of file