Maven使用笔记(八)Maven使用问题记录Ⅱ

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin...There are test failures.

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project myproject: There are test failures.
Please refer to E:\myproject\target\surefire-reports for the individual test results.

解决方法:
测试代码时遇到错误停止编译。可以在pom.xml的忽略错误,使得测试出错不影响项目的编译。

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <testFailureIgnore>true</testFailureIgnore>            </configuration>
        </plugin>
    </plugins>
</build>

  

你可能感兴趣的:(Maven使用笔记(八)Maven使用问题记录Ⅱ)