Including JUnit 5 dependency in IntelliJ IDEA
If your project is Maven or Gradle based, the dependency is added via pom.xml
or build.gradle
, otherwise you just add the .jar
files to the Module Dependencies.
IDE can help you with that, press Alt+Enter on the red code:
The following dependencies will be downloaded from the Maven repository and added to the classpath:
I made this work by adding this to my pom:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.0.0-M4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.0.0-M4</version>
<scope>test</scope>
</dependency>