2013-02-01 51 views
0

我想編譯和構建從https://github.com/rtyley/spongycastle/archive/spongy-master.zip一個jar文件(SpongeCastle庫)錯誤而編譯Java中使用MVN

然而,當我試圖測試MVN,在MVN顯示以下錯誤 (JDK 1.6.0_37, Maven 3.0.4,Mac OSX snowleopard)

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project scpg-jdk15on: There are test failures. 
[ERROR] 
[ERROR] Please refer to /Users/Lara/Desktop/BlowFish/spongycastle-spongy-master/scpg-jdk15on/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 :scpg-jdk15on 

我該如何解決這個錯誤?

+0

你看過錯誤信息嗎? – ben75

+0

在信息中你還不清楚什麼? –

+0

這個神器似乎是用於jdk 1.5的,你使用的是jdk 1.6 ...也許是問題的原因?查看/ Users/Lara/Desktop/BlowFish/spongycastle-spongy-master/scpg-jdk15on/target/surefire-reports – ben75

回答

0

它看起來像是有一個名爲「default-test」的單元測試失敗,並阻止maven構建jar。您可以檢查並修復失敗測試的原因,或者你可以嘗試建立罐子不使用運行測試:

mvn install -DskipTests