+ 1
Intellij(maven) question
Im running some tests on intellij, when i run it it says "package org.junit..... does not exist" , so i reloaded the project by right clicking on the pom.xml file but now it says "package main does not exist", if i manually select main folder as the source, the first problem will repeat itself, any idea how to fix it?
4 Answers
+ 3
Do you noticed that
Note: This artifact was moved to:
org.junit.jupiter » junit-jupiter-api
So try
import junit-jupiter-api;
Instead of org.junit.jupiter;
Not sure, unless to see exact error. Hope it works...
edit :
Lenoname also before try by removing
<scope> test </scope> from dependency
+ 1
// did you added this dependency in pom.xml?
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
// <scope>test</scope> remove this line..
</dependency>
+ 1
These are in my dependencies:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.9.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
+ 1
And i didnt add <!-- https://mvnrepository.com/artifact/junit/junit -->, is that bad?