1. PagingAndSortingRepository doesn't extend CrudRepository anymore. For all extending that interface repositories CrudRepository super interface shall be now declared (https://spring.io/blog/2022/02/22/announcing-listcrudrepository-friends-for-spring-data-3-0 - ``` The popular PagingAndSortingRepository used to extend from CrudRepository, but it no longer does. This lets you combine it with either CrudRepository or ListCrudRepository or a base interface of your own creation. This means you now have to explicitly extend from a CRUD fragment, even when you already extend from PagingAndSortingRepository. ``` ) 2. org.eclipse.hawkbit.autoconfigure.mgmt.ui -> move in hawkbit-ui (to be ready for removal), anyway - it's a better location for ui related configs 3. extends WebMvcConfigurerAdapter -> implements WebMvcConfigurer 4. remove WebSecurityConfigurerAdapter -> https://docs.spring.io/spring-security/reference/5.8/migration/servlet/config.html#_stop_using_websecurityconfigureradapter, https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter and add @Order to the bean reg!! 5. Use configurers (the other will be deprecated / removed), e.d: http.csrf().disable() -> http.csrf(AbstractHttpConfigurer::disable) 6. configure(final AuthenticationManagerBuilder auth) -> put in httpsecurity config - http.getSharedObject(AuthenticationManagerBuilder.class).... (https://www.baeldung.com/spring-security-authentication-provider) 7. configure(final WebSecurity webSecurity) -> ``` @Bean public WebSecurityCustomizer webSecurityCustomizer() { return (web) -> web.ignoring().antMatchers("/documentation/**", "/VAADIN/**", "/*.*", "/docs/**"); } ``` (https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter) 8. AuthenticationManager authenticationManagerBean() -> ``` @Bean AuthenticationManager authenticationManager(final AuthenticationConfiguration authenticationConfiguration) throws Exception { return authenticationConfiguration.getAuthenticationManager(); } ``` (https://backendstory.com/spring-security-how-to-replace-websecurityconfigureradapter/) 9. WebMvcAutoConfiguration could be removed - it uses deprectated methods, and sets properties that are same by default - hence - not neeeded (https://github.com/spring-projects/spring-framework/issues/23915#issuecomment-563987147) Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
243 lines
9.6 KiB
XML
243 lines
9.6 KiB
XML
<!--
|
|
|
|
Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
|
|
|
All rights reserved. This program and the accompanying materials
|
|
are made available under the terms of the Eclipse Public License v1.0
|
|
which accompanies this distribution, and is available at
|
|
http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
-->
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>org.eclipse.hawkbit</groupId>
|
|
<artifactId>hawkbit-parent</artifactId>
|
|
<version>0.3.0-SNAPSHOT</version>
|
|
</parent>
|
|
<artifactId>hawkbit-ui</artifactId>
|
|
<name>hawkBit :: Mgmt UI</name>
|
|
<description>Bosch IoT Software Provisioning server web application</description>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.vaadin</groupId>
|
|
<artifactId>vaadin-maven-plugin</artifactId>
|
|
<version>${vaadin.plugin.version}</version>
|
|
<configuration>
|
|
<extraJvmArgs>-Xmx2g -Xss1024k</extraJvmArgs>
|
|
<!-- We are doing "inplace" gwt compilation but into subdir VAADIN/widgetsets -->
|
|
<webappDirectory>src/main/resources/VAADIN/widgetsets</webappDirectory>
|
|
<hostedWebapp>src/main/resources/VAADIN/widgetsets</hostedWebapp>
|
|
<warSourceDirectory>src/main/resources</warSourceDirectory>
|
|
<noServer>true</noServer>
|
|
<!-- Remove draftCompile when project is ready -->
|
|
<draftCompile>false</draftCompile>
|
|
<persistentunitcachedir>${project.build.directory}/gwtdirt</persistentunitcachedir>
|
|
<compileReport>true</compileReport>
|
|
<style>OBF</style>
|
|
<strict>true</strict>
|
|
<!-- Symbol maps etc, not needed in vaadin app, just target them outside war -->
|
|
<deploy>${project.build.directory}/gwt-deploy</deploy>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<phase>process-classes</phase>
|
|
<configuration>
|
|
<!-- if you don't specify any modules, the plugin will find them -->
|
|
</configuration>
|
|
<goals>
|
|
<goal>resources</goal>
|
|
<goal>update-theme</goal>
|
|
<goal>update-widgetset</goal>
|
|
<goal>compile-theme</goal>
|
|
<goal>compile</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<phase>process-classes</phase>
|
|
<configuration>
|
|
<target>
|
|
<copy todir="${project.build.directory}/classes/VAADIN/widgetsets">
|
|
<fileset dir="${basedir}/src/main/resources/VAADIN/widgetsets" includes="**/*" />
|
|
</copy>
|
|
<copy file="${basedir}/src/main/resources/VAADIN/themes/hawkbit/styles.css"
|
|
tofile="${project.build.directory}/classes/VAADIN/themes/hawkbit/styles.css" />
|
|
</target>
|
|
</configuration>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
|
|
<plugin>
|
|
<groupId>org.eclipse.m2e</groupId>
|
|
<artifactId>lifecycle-mapping</artifactId>
|
|
<version>1.0.0</version>
|
|
<configuration>
|
|
<lifecycleMappingMetadata>
|
|
<pluginExecutions>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>
|
|
org.codehaus.mojo
|
|
</groupId>
|
|
<artifactId>
|
|
properties-maven-plugin
|
|
</artifactId>
|
|
<versionRange>
|
|
[1.0-alpha-2,)
|
|
</versionRange>
|
|
<goals>
|
|
<goal>
|
|
write-project-properties
|
|
</goal>
|
|
</goals>
|
|
</pluginExecutionFilter>
|
|
<action>
|
|
<ignore />
|
|
</action>
|
|
</pluginExecution>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>com.vaadin</groupId>
|
|
<artifactId>vaadin-maven-plugin</artifactId>
|
|
<versionRange>[7.7.3,)</versionRange>
|
|
<goals>
|
|
<goal>compile-theme</goal>
|
|
</goals>
|
|
</pluginExecutionFilter>
|
|
<action>
|
|
<ignore />
|
|
</action>
|
|
</pluginExecution>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<versionRange>[1.7,)</versionRange>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
</pluginExecutionFilter>
|
|
<action>
|
|
<ignore />
|
|
</action>
|
|
</pluginExecution>
|
|
</pluginExecutions>
|
|
</lifecycleMappingMetadata>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.eclipse.hawkbit</groupId>
|
|
<artifactId>hawkbit-repository-api</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.eclipse.hawkbit</groupId>
|
|
<artifactId>hawkbit-http-security</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.eclipse.hawkbit</groupId>
|
|
<artifactId>hawkbit-autoconfigure</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>commons-io</groupId>
|
|
<artifactId>commons-io</artifactId>
|
|
</dependency>
|
|
<!-- Vaadin -->
|
|
<dependency>
|
|
<groupId>com.vaadin</groupId>
|
|
<artifactId>vaadin-spring-boot</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.vaadin.spring.addons</groupId>
|
|
<artifactId>vaadin-spring-addon-eventbus</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.vaadin.spring.extensions</groupId>
|
|
<artifactId>vaadin-spring-ext-security</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.vaadin</groupId>
|
|
<artifactId>vaadin-server</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.vaadin</groupId>
|
|
<artifactId>vaadin-client</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.vaadin</groupId>
|
|
<artifactId>vaadin-push</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.security</groupId>
|
|
<artifactId>spring-security-web</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.vaadin</groupId>
|
|
<artifactId>vaadin-themes</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.vaadin.alump.distributionbar</groupId>
|
|
<artifactId>dbar-addon</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.gwtd3</groupId>
|
|
<artifactId>gwt-d3-api</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.cronutils</groupId>
|
|
<artifactId>cron-utils</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.ben-manes.caffeine</groupId>
|
|
<artifactId>caffeine</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Test -->
|
|
<dependency>
|
|
<groupId>org.eclipse.hawkbit</groupId>
|
|
<artifactId>hawkbit-repository-jpa</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.qameta.allure</groupId>
|
|
<artifactId>allure-junit5</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|