Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.

前端 未结 28 1619
予麋鹿
予麋鹿 2020-12-03 06:41

I have been trying from a couple of days to resolve the following error but I am unable to resolve it :(

My module\'s pom.xml file is:



        
28条回答
  •  情书的邮戳
    2020-12-03 06:59

    Was facing the same issue multiple times and I have 2 solutions:

    Solution 1: Add surefire plugin reference to pom.xml. Watch that you have all nodes! In my IDEs auto import version was missing!!!

    
        
            org.apache.maven.plugins
            maven-surefire-plugin
            3.0.0-M3
        
    
    

    Solution 2: My IDE added wrong import to the start of the file.

    IDE added

    import org.junit.Test;
    

    I had to replace it with

    import org.junit.jupiter.api.Test;
    

提交回复
热议问题