Skip to content

Commit 58d2346

Browse files
author
Damian Staszewski
committed
adding JUnit 5 (Updated)
Signed-off-by: Damian Staszewski <[email protected]>
1 parent cc46f2a commit 58d2346

File tree

1 file changed

+70
-3
lines changed

1 file changed

+70
-3
lines changed

pom.xml

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
<properties>
3939
<projec.build.sourceEncodingt>UTF-8</projec.build.sourceEncodingt>
4040
<skipTest>true</skipTest>
41+
<java.version>1.8</java.version>
42+
<junit.version>4.12</junit.version>
43+
<junit.jupiter.version>5.0.1</junit.jupiter.version>
44+
<junit.vintage.version>${junit.version}.1</junit.vintage.version>
45+
<junit.platform.version>1.0.1</junit.platform.version>
4146
</properties>
4247

4348
<build>
@@ -48,8 +53,8 @@
4853
<artifactId>maven-compiler-plugin</artifactId>
4954
<version>3.7.0</version>
5055
<configuration>
51-
<source>1.8</source>
52-
<target>1.8</target>
56+
<source>${java.version}</source>
57+
<target>${java.version}</target>
5358
</configuration>
5459
</plugin>
5560
<!-- Compiling source -->
@@ -110,6 +115,30 @@
110115
</execution>
111116
</executions>
112117
</plugin>
118+
<!-- Junit Test (JUnit 5) -->
119+
<plugin>
120+
<groupId>org.apache.maven.plugins</groupId>
121+
<artifactId>maven-surefire-plugin</artifactId>
122+
<version>2.19.1</version>
123+
<configuration>
124+
<includes>
125+
<include>**/Test*.java</include>
126+
<include>**/*Test.java</include>
127+
<include>**/*Tests.java</include>
128+
<include>**/*TestCase.java</include>
129+
</includes>
130+
<properties>
131+
<excludeTags>slow</excludeTags>
132+
</properties>
133+
</configuration>
134+
<dependencies>
135+
<dependency>
136+
<groupId>org.junit.platform</groupId>
137+
<artifactId>junit-platform-surefire-provider</artifactId>
138+
<version>${junit.platform.version}</version>
139+
</dependency>
140+
</dependencies>
141+
</plugin>
113142
</plugins>
114143
</build>
115144

@@ -131,12 +160,14 @@
131160
<artifactId>jackson-dataformat-xml</artifactId>
132161
<version>2.9.1</version>
133162
</dependency>
163+
<!-- ROME for getting history from https://status.hirezstudios.com/ -->
134164
<dependency>
135165
<groupId>com.rometools</groupId>
136166
<artifactId>rome</artifactId>
137167
<version>1.8.0</version>
138168
<scope>compile</scope>
139169
</dependency>
170+
<!-- HTML formatter -->
140171
<dependency>
141172
<groupId>org.jsoup</groupId>
142173
<artifactId>jsoup</artifactId>
@@ -149,10 +180,46 @@
149180
<version>1.7.25</version>
150181
<scope>provided</scope>
151182
</dependency>
183+
184+
<!-- Junit 5 -->
152185
<dependency>
153186
<groupId>org.junit.jupiter</groupId>
154187
<artifactId>junit-jupiter-api</artifactId>
155-
<version>5.0.0</version>
188+
<version>${junit.jupiter.version}</version>
189+
<scope>test</scope>
190+
</dependency>
191+
<dependency>
192+
<groupId>junit</groupId>
193+
<artifactId>junit</artifactId>
194+
<version>${junit.version}</version>
195+
<scope>test</scope>
196+
</dependency>
197+
<!-- Only required to run tests in an IDE that bundles an older version -->
198+
<dependency>
199+
<groupId>org.junit.platform</groupId>
200+
<artifactId>junit-platform-launcher</artifactId>
201+
<version>${junit.platform.version}</version>
202+
<scope>test</scope>
203+
</dependency>
204+
<!-- Only required to run tests in an IDE that bundles an older version -->
205+
<dependency>
206+
<groupId>org.junit.jupiter</groupId>
207+
<artifactId>junit-jupiter-engine</artifactId>
208+
<version>${junit.jupiter.version}</version>
209+
<scope>test</scope>
210+
</dependency>
211+
<!-- Only required to run tests in an IDE that bundles an older version -->
212+
<dependency>
213+
<groupId>org.junit.vintage</groupId>
214+
<artifactId>junit-vintage-engine</artifactId>
215+
<version>${junit.vintage.version}</version>
216+
<scope>test</scope>
217+
</dependency>
218+
<!-- To avoid compiler warnings about @API annotations in JUnit code -->
219+
<dependency>
220+
<groupId>org.apiguardian</groupId>
221+
<artifactId>apiguardian-api</artifactId>
222+
<version>1.0.0</version>
156223
<scope>test</scope>
157224
</dependency>
158225
</dependencies>

0 commit comments

Comments
 (0)