Skip to content

Commit e19da4d

Browse files
committed
run JUnit 4 and 5
1 parent 675b179 commit e19da4d

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

pom.xml

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,38 +43,40 @@
4343

4444
</dependencies>
4545

46-
<profiles>
47-
<profile>
48-
<id>eclipse</id>
49-
<dependencies>
50-
<dependency>
51-
<groupId>org.junit.jupiter</groupId>
52-
<artifactId>junit-jupiter-engine</artifactId>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.junit.platform</groupId>
56-
<artifactId>junit-platform-launcher</artifactId>
57-
<version>1.6.0</version>
58-
<scope>test</scope>
59-
</dependency>
60-
</dependencies>
61-
<dependencyManagement>
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.apache.maven.plugins</groupId>
50+
<artifactId>maven-compiler-plugin</artifactId>
51+
<version>3.8.0</version>
52+
</plugin>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-surefire-plugin</artifactId>
56+
<version>${maven-surefire-plugin.version}</version>
6257
<dependencies>
58+
<!-- let surefire run JUnit 4 but also JUnit 5 tests -->
6359
<dependency>
64-
<groupId>org.junit.jupiter</groupId>
65-
<artifactId>junit-jupiter-engine</artifactId>
66-
<version>${junit5.version}</version>
67-
<scope>test</scope>
60+
<groupId>org.junit.platform</groupId>
61+
<artifactId>junit-platform-surefire-provider</artifactId>
62+
<version>${junit.platform.version}</version>
6863
</dependency>
64+
<!-- let JUnit vintage engine run JUnit 3 or JUnit 4 tests -->
6965
<dependency>
70-
<groupId>org.junit.platform</groupId>
71-
<artifactId>junit-platform-launcher</artifactId>
72-
<version>1.1.1</version>
73-
<scope>test</scope>
66+
<groupId>org.junit.vintage</groupId>
67+
<artifactId>junit-vintage-engine</artifactId>
68+
<version>${junit.vintage.version}</version>
69+
</dependency>
70+
<!-- let JUnit 5 engine run JUnit 5 tests -->
71+
<dependency>
72+
<groupId>org.junit.jupiter</groupId>
73+
<artifactId>junit-jupiter-engine</artifactId>
74+
<version>${junit.jupiter.version}</version>
7475
</dependency>
7576
</dependencies>
76-
</dependencyManagement>
77-
</profile>
78-
</profiles>
77+
</plugin>
78+
79+
</plugins>
80+
</build>
7981

8082
</project>

0 commit comments

Comments
 (0)