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

前端 未结 28 1414
予麋鹿
予麋鹿 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 07:17

    If you are using ubantu then try to run MVN with sudo. I got same error for

    mvn -Dtest=PerfLatency#latencyTest test -X 
    

    But

    sudo mvn -Dtest=PerfLatency#latencyTest test -X 
    

    Solved my problem

    0 讨论(0)
  • 2020-12-03 07:17

    Check your test files. You must clear all test files error on your project and try Clean and build.

    0 讨论(0)
  • 2020-12-03 07:18

    Make sure the name of the class created in the package is something like somethingTest.java Maven only picks the java files ending with Test notation.

    I was getting the same error and resolving the names of all my classes by adding 'Test' at the end made it work.

    0 讨论(0)
  • 2020-12-03 07:18

    I was facing the same problem and how i resolved see below steps or Image:

    1. Clicked on Windows menu item of eclipse
    2. Clicked on preferences
    3. select Installed JREs
    4. Add your installed jdk's path(JRE home: C:\Program Files\Java\jdk1.8.0_201\jre`)
    5. Add JRE name: jdk1.8.0_201
    6. Clicked on Finish
    7. Apply changes and close

    enter image description here

    0 讨论(0)
提交回复
热议问题