maven install時報錯 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (

今天在一個maven項目上執行maven install命令的時候一直報錯,錯誤信息以下:apache

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.167 s
[INFO] Finished at: 2018-05-27T23:11:47+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project e3-manager-service: There are test failures.
[ERROR] 
[ERROR] Please refer to E:\develop\eclipse-workspache\ExclusiveWorkspache\e3-manager\e3-manager-service\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

解決上述問題有兩種辦法:eclipse

1 安裝maven工程的時候跳過測試maven

clean install -DskipTests

這樣就可以成功安裝了:測試

 

 2 將跳過測試寫入pom.xml文件spa

<plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-surefire-plugin</artifactId>  
        <version>2.4.2</version>  
        <configuration>  
          <skipTests>true</skipTests>  
        </configuration>  
</plugin>  
相關文章
相關標籤/搜索