Skip to content

Commit 09a8453

Browse files
committed
surefire updated to more recent to support junit5 launcher
1 parent aa357eb commit 09a8453

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

junit5-testing-examples/pom.xml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@
6363
<groupId>com.google.code.gson</groupId>
6464
<artifactId>gson</artifactId>
6565
</exclusion>
66-
<exclusion>
67-
<groupId>com.google.classpath-explorer</groupId>
68-
<artifactId>classpath-explorer</artifactId>
69-
</exclusion>
66+
7067
<exclusion>
7168
<groupId>org.jukito</groupId>
7269
<artifactId>jukito</artifactId>
@@ -125,6 +122,10 @@
125122
<groupId>org.junit.platform</groupId>
126123
<artifactId>junit-platform-runner</artifactId>
127124
</dependency>
125+
<dependency>
126+
<groupId>org.junit.platform</groupId>
127+
<artifactId>junit-platform-launcher</artifactId>
128+
</dependency>
128129
</dependencies>
129130

130131
<build>
@@ -136,8 +137,16 @@
136137
<plugin>
137138
<groupId>org.apache.maven.plugins</groupId>
138139
<artifactId>maven-surefire-plugin</artifactId>
140+
<dependencies>
141+
<!-- Forces Surefire to use JUnitPlatformProvider over JUnit4Provider
142+
when both junit-vintage-engine and junit-jupiter-engine are present -->
143+
<dependency>
144+
<groupId>org.junit.platform</groupId>
145+
<artifactId>junit-platform-launcher</artifactId>
146+
<version>${junit-platform-runner.version}</version>
147+
</dependency>
148+
</dependencies>
139149
<configuration>
140-
<!--<junitPlatformArtifactName>com.github.junit-team.junit5:junit-platform-engine</junitPlatformArtifactName>-->
141150
<!--<properties>-->
142151
<!--<configurationParameters>-->
143152
<!--junit.jupiter.execution.parallel.enabled=true-->
@@ -149,6 +158,13 @@
149158
<include>org.jsmart.zerocode.jupiter.extension.ParallelLoadExtensionTest</include>
150159
<include>org.jsmart.zerocode.tests.loadjupiter.JUnit5LoadTest</include>
151160
</includes>
161+
162+
<!--
163+
<includes>
164+
<include>**/*Test.java</include>
165+
</includes>
166+
-->
167+
152168
</configuration>
153169
</plugin>
154170
</plugins>

pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
8484
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
8585
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
86-
<maven-surefire-plugin.version>3.2.1</maven-surefire-plugin.version>
86+
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
8787
<maven-dependency-plugin.version>3.6.1</maven-dependency-plugin.version>
8888

8989
<!-- Release Build will not fail if error occurs during javadoc generation -->
@@ -124,6 +124,11 @@
124124
<artifactId>junit-platform-runner</artifactId>
125125
<version>${junit-platform-runner.version}</version>
126126
</dependency>
127+
<dependency>
128+
<groupId>org.junit.platform</groupId>
129+
<artifactId>junit-platform-launcher</artifactId>
130+
<version>${junit-platform-runner.version}</version>
131+
</dependency>
127132
<dependency>
128133
<groupId>org.mockito</groupId>
129134
<artifactId>mockito-core</artifactId>

0 commit comments

Comments
 (0)