Problem when running unit test with Junit5

67 Views Asked by At

I'm trying to do some units tests but no matter what, I always received the following error: java.lang.NoClassDefFoundError: org/junit/jupiter/api/extension/ScriptEvaluationException

This is from the POM:

Pom's

I think that my IDE is not recognizing the library itself.

This is the outcome when I put this mvn dependency:tree -Dincludes=:jupiter-api dependecy tree

I'm using IntelliJ Ultimate IntelliJ IDEA 2023.3.2 and JDK 17.0.2.

1

There are 1 best solutions below

2
dcm50 On BEST ANSWER

I removed from my POM the <version> of each dependency of the <groupId> that has Jupiter and updated BOM's in the <properties> tag.