maven打包时报的一个错误
maven打包时,报的一个错误:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins2.10:test (default-test) on project mock-bank-service: There are test failures.
这是因为测试代码遇到错误时,会停止编译。
解决办法:
在pom.xml文件中,加入下列配置即可:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
还没有评论,来说两句吧...