【无标题】

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project maven-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

这个缺少插件的错误,一般是没有利用骨架,Maven就不会自己给你创建这个插件,所以在结合Mybatis时就会报错

问题解决:在pom.xml的build中加入这个插件,并指明jdk的版本




org.apache.maven.plugins
maven-compiler-plugin
3.8.0

1.8
1.8




org.apache.maven.plugins
maven-surefire-plugin
2.22.1

true



另外多说一句:你要是在spring框架中整个mybatis时,还要加以下代码到pom.xml中,否则也是会报其他错的。

    
        
            src/main/java
            
                
                **/*.properties
                **/*.xml
            
            false
        
    

本文内容来自https://blog.csdn.net/weixin_46688566/article/details/126470742

你可能感兴趣的:(mybatis,maven,java)