whichlead me to see that this might me related to junit test compilation failing. It turns out I had an older/mismatching of the vintage engine and the jupiter engine which are likely to have different java versions relating in the error above. Changing them to be the same $version.junit removed the error.
In my case, I was using Spring Framework 6.0.0 and JDK 11 as the same time. This is not supported according to spring framework wiki. After I degraded the spring framework version to 5.3.24, it solved.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cake-util: Compilation failure: Compilation failure:
[ERROR] /Users/kasperni/workspace/CAKE/cake-util/cake-util/target/clover/src-instrumented/org/cakeframework/internal/util/tree/Fails.java:[27,67] reference to depthFirstTraversal is ambiguous
[ERROR] both method depthFirstTraversal(java.lang.Class) in org.cakeframework.internal.util.tree.Fails and method depthFirstTraversal(java.util.function.Predicate
3a8082e126