Update Spring Boot to 2.3.2

-Update Spring Cloud to Hoxton.SR7
-Replace ResourceSupport by RepresentationModel (Spring Hateoas 1.0)
-Replace ControllerLinkBuilder by WebMvcLinkBuilder (Spring Hateoas 1.0)
-Move getId() from Identifiable to BaseEntity (Spring Hateoas 1.0)
-Remove hamcrest.Factory
-Use static Sort.by reference
-Place http security anyRequest().authenticated()
-Replace MockMvcRequestBuilders.fileUpload by MockMvcRequestBuilders.multipart
-Deprecate MEDIA_TYPE_CBOR_UTF8
-Replace MEDIA_TYPE_CBOR_UTF8 by MEDIA_TYPE_CBOR in tests
-Replace HAL_JSON_UTF8 by HAL_JSON in tests
-Replace APPLICATION_JSON_UTF8 by APPLICATION_JSON in tests
-Use org.mockito.junit.MockitoJUnitRunner
-Remove overridden dependency versions
-Removing not needed comments in pom.xml
-Downgrade flyway-core to be MySQL 5.6 compatible
-Add maven-site-plugin since it was removed with spring-boot 2.3
-Set servlet encoding properties
-Introducing Test that verifies the charset inside the content-type of a response
-Add @DirtiesContext to CorsTest and ContentTypeTest
-Add content-type mockmvc test with adapted mockmvc config
-Move encoding.force property to test class
-Switch expected and actual parameter values in content-type test
-Delete deprecated content-type test with TestRestTemplate
-Exclude JUnit5 from spring-boot-starter-test
-Upgrade allure-junit4 to 2.13.5
-Add aspectjweaver 1.9.6 to surefire test execution
-Add flyway-core version to property
-Use getRequiredLink() within MgmtBaseEntity.getId()

Signed-off-by: Ammar Bikic <ammar.bikic@bosch.io>
This commit is contained in:
Ammar Bikic
2020-01-30 13:44:25 +01:00
parent e6b5f480da
commit 28b65a290d
106 changed files with 664 additions and 419 deletions

87
pom.xml
View File

@@ -16,12 +16,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
<version>2.3.2.RELEASE</version>
</parent>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>hawkBit :: Parent</name>
@@ -128,8 +128,9 @@
<properties>
<java.version>1.8</java.version>
<spring.boot.version>2.1.4.RELEASE</spring.boot.version>
<spring.cloud.version>Greenwich.RELEASE</spring.cloud.version>
<spring.boot.version>2.3.2.RELEASE</spring.boot.version>
<spring.cloud.version>Hoxton.SR7</spring.cloud.version>
<spring.plugin.core.version>2.0.0.RELEASE</spring.plugin.core.version>
<snapshotDependencyAllowed>true</snapshotDependencyAllowed>
@@ -137,13 +138,11 @@
upgrade) - START -->
<!-- Newer versions needed than defined in Boot -->
<!-- Fixed dependencies -->
<rabbitmq.http-client.version>2.1.0.RELEASE</rabbitmq.http-client.version>
<!-- Older versions needed than defined in Boot -->
<!-- Piggy back existing Eclipse CQs -->
<commons-lang3.version>3.7</commons-lang3.version>
<classmate.version>1.3.4</classmate.version>
<!-- Newer versions (tested 4.5.7) do not seem to work with RabbitMQ management plugin -->
<httpclient.version>4.5.6</httpclient.version>
<rabbitmq.http-client.version>3.5.0.RELEASE</rabbitmq.http-client.version>
<!-- Newer version contains new rule that we violate. Needs to be fixed first -->
<hibernate-validator.version>6.0.20.Final</hibernate-validator.version>
<!-- Newer community version does not support MySQL 5.6 anymore -->
<flyway-core.version>5.2.4</flyway-core.version>
<!-- Spring boot version overrides - END -->
<!-- Vaadin versions - START -->
@@ -151,6 +150,8 @@
<vaadin.spring.version>3.2.1</vaadin.spring.version>
<vaadin.spring.addon.version>2.0.0.RELEASE</vaadin.spring.addon.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<vaadin.addon.vaadin-lazyquerycontainer.version>7.6.1.3</vaadin.addon.vaadin-lazyquerycontainer.version>
<vaadin.addon.flexibleoptiongroup.version>2.2.0</vaadin.addon.flexibleoptiongroup.version>
<vaadin.addon.dbar-addon.version>3.0.1</vaadin.addon.dbar-addon.version>
<vaadin.gwt-api.version>1.3.0</vaadin.gwt-api.version>
<vaadin.gwt-user.version>2.8.2</vaadin.gwt-user.version>
@@ -158,12 +159,13 @@
<maven.processor.plugin.version>3.3.3</maven.processor.plugin.version>
<maven.scm.plugin.version>1.11.1</maven.scm.plugin.version>
<maven.site.plugin.version>3.9.0</maven.site.plugin.version>
<!-- Misc libraries versions - START -->
<cron-utils.version>5.0.5</cron-utils.version>
<jsoup.version>1.11.2</jsoup.version>
<allure.version>2.7.0</allure.version>
<eclipselink.version>2.7.3</eclipselink.version>
<allure.version>2.13.5</allure.version>
<eclipselink.version>2.7.6</eclipselink.version>
<gwtmockito.version>1.1.8</gwtmockito.version>
<guava.version>25.0-jre</guava.version>
<javax.el-api.version>2.2.4</javax.el-api.version>
@@ -198,8 +200,9 @@
${project.basedir}/../hawkbit-test-report/target/jacoco-aggregate/jacoco.xml,
${project.basedir}/../../hawkbit-test-report/target/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
<!-- Sonar - END -->
<!-- required for allure-junit (https://docs.qameta.io/allure/#_java) -->
<aspectj-weaver.arg>-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"</aspectj-weaver.arg>
<!-- ************************ -->
<!-- Maven Surefire settings -->
@@ -373,7 +376,7 @@
</goals>
</pluginExecutionFilter>
<action>
<ignore />
<ignore/>
</action>
</pluginExecution>
<pluginExecution>
@@ -408,9 +411,7 @@
<useSystemClassLoader>false</useSystemClassLoader>
<reuseForks>true</reuseForks>
<forkCount>${surefire.forkcount}</forkCount>
<argLine>
${jacoco.agent.ut.arg}
</argLine>
<argLine>${jacoco.agent.ut.arg} ${aspectj-weaver.arg}</argLine>
<properties>
<property>
<name>listener</name>
@@ -426,6 +427,13 @@
<exclude>**/Abstract*.java</exclude>
</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -433,7 +441,7 @@
<configuration>
<reuseForks>false</reuseForks>
<forkCount>${surefire.forkcount}</forkCount>
<argLine>-Xmx1024m ${jacoco.agent.ut.arg}</argLine>
<argLine>-Xmx1024m ${jacoco.agent.ut.arg} ${aspectj-weaver.arg}</argLine>
<properties>
<property>
<name>listener</name>
@@ -441,6 +449,13 @@
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>integration-test</id>
@@ -454,6 +469,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven.site.plugin.version}</version>
<configuration>
<skip>true</skip>
<skipDeploy>true</skipDeploy>
@@ -554,7 +570,7 @@
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</exclusion>
</exclusions>
</exclusions>
</dependency>
<dependency>
<groupId>org.vaadin.spring.addons</groupId>
@@ -575,7 +591,7 @@
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring</artifactId>
</exclusion>
</exclusion>
</exclusions>
</dependency>
<dependency>
@@ -589,7 +605,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway-core.version}</version>
</dependency>
<!-- Misc -->
<dependency>
<groupId>com.rabbitmq</groupId>
@@ -645,9 +665,9 @@
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusion>
</exclusions>
</dependency>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework.cloud</groupId>
@@ -724,6 +744,11 @@
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>${eclipselink.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId>
<version>${spring.plugin.core.version}</version>
</dependency>
<!-- Protostuff Io -->
<dependency>
@@ -757,6 +782,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<!-- As long as JUnit 5 is not used, these dependencies can be excluded -->
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
</exclusion>
<!-- Allure JUnit4 does not work with junit-vintage-engine -->
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>