2016-05-05 119 views
3

Im爲jenkins構建一個自定義maven項目。使用命令後MAVEN SUREFIRE插件錯誤

mvn -Plight-test install 

我收到此錯誤。請幫助。我還在pom.xml文件中添加了絕對例外的插件,但它不起作用!錯誤日誌如下:

[INFO] ------------------------------------------------------------------------ 
    [INFO] Reactor Summary: 
    [INFO] 
    [INFO] Jenkins main module ................................ SUCCESS [ 11.809 s] 
    [INFO] Jenkins cli ........................................ SUCCESS [ 38.319 s] 
    [INFO] Jenkins core ....................................... FAILURE [11:15 min] 
    [INFO] Jenkins war ........................................ SKIPPED 
    [INFO] Tests for Jenkins core ............................. SKIPPED 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] BUILD FAILURE 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Total time: 12:10 min 
    [INFO] Finished at: 2016-05-05T12:26:54+05:30 
    [INFO] Final Memory: 39M/277M 
    [INFO] ------------------------------------------------------------------------ 
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project jenkins-core: 
    . 
    [ERROR] 
    [ERROR] Please refer to C:\Users\Anishas\git\jenkins\core\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 
    [ERROR] 
    [ERROR] After correcting the problems, you can resume the build with the command 
    [ERROR] mvn <goals> -rf :jenkins-core 

enter image description here

編譯: enter image description here

+0

「使用-X開關重新運行Maven以啓用完全調試日誌記錄。」 – Lee

+0

@李先生謝謝你的建議。但是,如果輸出量過大,我該如何識別缺陷? – Learner

+0

好吧,從你發佈的內容看,除了失敗之外,你不能看到非常多的東西在詹金斯核心。以-X運行,您將不得不手動鑽取到適當的區域。如果運行mvn -rf jenkins-core -X將從故障點重新啓動構建。 – Lee

回答

1
mvn -Dmaven.test.skip=true -DskipTests=true clean install 

使用這個命令

1

重新運行與mvn -Plight-test install -rf jenkins-core -X到誤差隔離

+0

說:[錯誤] [錯誤]無法找到項目以恢復反應堆生成:jenkins-core vs [MavenProject:org.jenkins-ci。 main:pom:2.2- – Learner

+0

對不起,您還需要添加您的構建目標。 – Lee

+0

我附上的錯誤日誌的屏幕截圖 – Learner

1

我遇到了同樣的問題,並且發現問題在於某些測試嘗試創建系統鏈接,而這不可能,因爲我沒有在Windows中以管理員身份啓動IDE(IntellijIdea)。 我以管理員身份啓動了Intellij,解決了這個問題。

開發時跳過測試不是一個好的做法。

相關問題