[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project web_nanchang: There are test failures.
[ERROR]
[ERROR] Please refer to E:\maven\web_nanchang\target\surefire-reports for the individual test results.
解決方法:
這是因為測試代碼時遇到錯誤,它會停止編譯。只需要在pom.xml的<project>里添加以下配置,使得測試出錯不影響項目的編譯。
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <testFailureIgnore>true</testFailureIgnore> </configuration> </plugin> </plugins> </build>