解决Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1

编译Maven工程时,报错

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project shop-order: 
Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test failed: UTF- 8

报错原因:

解决办法:
在pom.xml文件中添加

  <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
        </plugins>
    </build>
posted @ 2020-08-10 22:52  L1ng14  阅读(2459)  评论(0编辑  收藏  举报