开发者社区> 问答> 正文

maven启动时为什么不忽略测试就会包以下报错(含解决方法)?报错

错误信息:

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project dec-util: 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


解决方法:

<p style="font-size:14px;font-family:Arial;background-color:#FFFFFF;">
	<br>
</p>
<p style="font-size:14px;font-family:Arial;background-color:#FFFFFF;">
	打包跳过测试有两种方法<br>



一是命令行,
mvn clean package -Dmaven.test.skip=true


二是写入pom文件,
<plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-surefire-plugin</artifactId>  
        <version>2.4.2</version>  
        <configuration>  
          <skipTests>true</skipTests>  
        </configuration>  
</plugin>  


展开
收起
爱吃鱼的程序员 2020-06-14 15:55:16 672 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

     @<atarget="_blank"rel="nofollow">Leelin 你的TestCase是不是写了不正常的System.exit()语句,贴出你的Case 看看

    2020-06-14 15:55:34
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
移动互联网测试到质量的转变 立即下载
给ITer的技术实战进阶课-阿里CIO学院独家教材(四) 立即下载
F2etest — 多浏览器兼容性测试整体解决方案 立即下载

相关镜像