Skip to content

Commit 40ce9ac

Browse files
author
Piotr Kubicki
committed
feat(pom): add Maven plugins for unit and integration testing, test reports, and code formatting
1 parent 92957ad commit 40ce9ac

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

pom.xml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,75 @@
4848
<groupId>org.springframework.boot</groupId>
4949
<artifactId>spring-boot-maven-plugin</artifactId>
5050
</plugin>
51+
52+
<!-- Unit tests -->
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-surefire-plugin</artifactId>
56+
<configuration>
57+
<includes>
58+
<include>**/*Test.java</include>
59+
<include>**/*Tests.java</include>
60+
</includes>
61+
</configuration>
62+
</plugin>
63+
64+
<!-- Integration tests -->
65+
<plugin>
66+
<groupId>org.apache.maven.plugins</groupId>
67+
<artifactId>maven-failsafe-plugin</artifactId>
68+
<configuration>
69+
<includes>
70+
<include>**/*IT.java</include>
71+
</includes>
72+
</configuration>
73+
<executions>
74+
<execution>
75+
<goals>
76+
<goal>integration-test</goal>
77+
<goal>verify</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
83+
<!-- Test reports (for CI pipeline) -->
84+
<plugin>
85+
<groupId>org.apache.maven.plugins</groupId>
86+
<artifactId>maven-surefire-report-plugin</artifactId>
87+
<version>3.5.4</version>
88+
<executions>
89+
<execution>
90+
<phase>verify</phase>
91+
<goals>
92+
<goal>report-only</goal>
93+
</goals>
94+
</execution>
95+
</executions>
96+
<configuration>
97+
<aggregate>true</aggregate>
98+
</configuration>
99+
</plugin>
100+
101+
<!-- Spotless -->
102+
<plugin>
103+
<groupId>com.diffplug.spotless</groupId>
104+
<artifactId>spotless-maven-plugin</artifactId>
105+
<version>2.43.0</version>
106+
<configuration>
107+
<java>
108+
<removeUnusedImports/>
109+
<eclipse/>
110+
</java>
111+
</configuration>
112+
<executions>
113+
<execution>
114+
<goals>
115+
<goal>check</goal>
116+
</goals>
117+
</execution>
118+
</executions>
119+
</plugin>
51120
</plugins>
52121
</build>
53122

0 commit comments

Comments
 (0)