Maven Failed to execute goal xxx:xxx(xxx) on project xxx: There are test failure问题解决
问题描述:
Failed to execute goal org.apache.maven.plugins2.22.2:test (default-test) on project easyexceltest: There are test failures.
Please refer to E:\idea\easyexceltest\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
问题分析:
1、项目引入了junit依赖,导致Maven在进行package操作时保错。
解决办法:
指定maven-surefire-plugin插件的skipTests为true即可。
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
2、使用了Plugins的install导致报错。
解决办法:
使用Lifecycle的install。
还没有评论,来说两句吧...