Skip to content

Commit 7789c5a

Browse files
committed
build(deps): add Maven Surefire and Failsafe #2
1 parent c08f63b commit 7789c5a

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

pom.xml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<properties>
1414
<!-- Global Maven settings -->
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
<skipUT>false</skipUT>
17+
<skipIT>true</skipIT>
1618

1719
<!-- Dependency versions -->
1820
<servlet-api.version>4.0.4</servlet-api.version>
@@ -27,6 +29,9 @@
2729
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
2830
<maven-dependency-plugin.version>3.2.0</maven-dependency-plugin.version>
2931
<maven-site-plugin.version>3.9.1</maven-site-plugin.version>
32+
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
33+
<maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
34+
<maven-surefire-report-plugin.version>3.0.0-M5</maven-surefire-report-plugin.version>
3035
</properties>
3136
<scm>
3237
<developerConnection>scm:git:https://github.com/gdcc/${project.artifactId}</developerConnection>
@@ -72,6 +77,8 @@
7277
<artifactId>maven-dependency-plugin</artifactId>
7378
<version>${maven-dependency-plugin.version}</version>
7479
</plugin>
80+
81+
<!-- Styling, Code Analysis, ... -->
7582
<plugin>
7683
<groupId>org.apache.maven.plugins</groupId>
7784
<artifactId>maven-site-plugin</artifactId>
@@ -99,6 +106,57 @@
99106
</dependency>
100107
</dependencies>
101108
</plugin>
109+
110+
<!-- Tests -->
111+
<plugin>
112+
<groupId>org.apache.maven.plugins</groupId>
113+
<artifactId>maven-surefire-plugin</artifactId>
114+
<version>${maven-surefire-plugin.version}</version>
115+
<configuration>
116+
<skipTests>${skipUT}</skipTests>
117+
</configuration>
118+
<executions>
119+
<execution>
120+
<phase>test</phase>
121+
<id>unit-test</id>
122+
<configuration>
123+
<excludes>
124+
<exclude>**/it/**</exclude>
125+
</excludes>
126+
<reportsDirectory>
127+
${project.build.directory}/test-reports/unit
128+
</reportsDirectory>
129+
</configuration>
130+
</execution>
131+
</executions>
132+
</plugin>
133+
<plugin>
134+
<groupId>org.apache.maven.plugins</groupId>
135+
<artifactId>maven-failsafe-plugin</artifactId>
136+
<version>${maven-failsafe-plugin.version}</version>
137+
<configuration>
138+
<skipITs>${skipIT}</skipITs>
139+
</configuration>
140+
<executions>
141+
<execution>
142+
<phase>integration-test</phase>
143+
<id>integration-test</id>
144+
<goals>
145+
<goal>integration-test</goal>
146+
<goal>verify</goal>
147+
</goals>
148+
<configuration>
149+
<trimStackTrace>false</trimStackTrace>
150+
<includes>
151+
<include>**/it/**</include>
152+
</includes>
153+
<reportsDirectory>
154+
${project.build.directory}/test-reports/it
155+
</reportsDirectory>
156+
</configuration>
157+
</execution>
158+
</executions>
159+
</plugin>
102160
</plugins>
103161
</build>
104162

0 commit comments

Comments
 (0)