使用MAVEN编译java时出错

时间:2013-02-01 17:50:59

标签: java android macos maven

我想从https://github.com/rtyley/spongycastle/archive/spongy-master.zip(SpongeCastle库)编译和构建一个jar文件

然而,当我尝试测试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

如何解决错误?

2 个答案:

答案 0 :(得分:0)

看起来有一个名为“default-test”的单元测试失败并阻止maven构建jar。您可以调查并修复失败测试的原因,也可以尝试使用以下命令构建jar而不运行测试:

 mvn install -DskipTests

答案 1 :(得分:0)

正如我的评论所指出的那样,这可能是你的jdk版本的一个问题,但也许还有别的...

我建议你阅读:http://www.randombugs.com/java/javalangsecurityexception-jce-authenticate-provider-bc.html

我认为它可以帮助您识别/解决您的问题。