Fix formatting in the dashboard
Change-Id: I3e7718fee18e38697aa1ac4ac1f08d6aee499d92
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
diff --git a/dashboard/webapp-backend/pom.xml b/dashboard/webapp-backend/pom.xml
index 80bb585..f089180 100644
--- a/dashboard/webapp-backend/pom.xml
+++ b/dashboard/webapp-backend/pom.xml
@@ -36,6 +36,8 @@
<properties>
<springfox.version>2.9.2</springfox.version>
<immutable.version>2.7.1</immutable.version>
+ <formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
+ <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
<!-- Set by Jenkins -->
<build.number>0</build.number>
</properties>
@@ -176,6 +178,32 @@
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
+ <groupId>net.revelc.code.formatter</groupId>
+ <artifactId>formatter-maven-plugin</artifactId>
+ <version>${formatter-maven-plugin.version}</version>
+ <configuration>
+ <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
+ </configuration>
+ <!-- https://code.revelc.net/formatter-maven-plugin/ use
+ mvn formatter:format spotless:apply process-sources -->
+ </plugin>
+ <plugin>
+ <groupId>com.diffplug.spotless</groupId>
+ <artifactId>spotless-maven-plugin</artifactId>
+ <version>${spotless-maven-plugin.version}</version>
+ <configuration>
+ <java>
+ <removeUnusedImports />
+ <importOrder>
+ <order>com,java,javax,org</order>
+ </importOrder>
+ </java>
+ </configuration>
+ <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
+ use mvn spotless:apply to rewrite source files use mvn spotless:check to
+ validate source files -->
+ </plugin>
+ <plugin>
<!-- Most configuration and all execution is inherited -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>