【问题标题】:Error while compile java using MVN使用 MVN 编译 java 时出错
【发布时间】:2013-02-01 17:50:59
【问题描述】:

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

但是,当我尝试测试 MVN 时,MVN 显示以下错误 (JDK 1.6.0_37、Maven 3.0.4、Mac OSX 雪豹)

[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

我该如何解决这个错误?

【问题讨论】:

  • 您阅读错误信息了吗?
  • 邮件中有什么不清楚的地方?
  • 工件似乎适用于 jdk 1.5 而您使用的是 jdk 1.6 ...也许是问题的原因?查看 /Users/Lara/Desktop/BlowFish/spongycastle-spongy-master/scpg-jdk15on/target/surefire-reports
  • 所有错误都包含 [Caused by: java.lang.SecurityException: JCE cannot authenticate the provider SC] 这是什么意思?,如何验证 provider SC?

标签: java android macos maven


【解决方案1】:

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

 mvn install -DskipTests

【讨论】:

    【解决方案2】:

    正如我的 cmets 中所述,可能是您的 jdk 版本有问题,但也可能是其他问题...

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

    我认为这将帮助您识别/解决您的问题。

    【讨论】:

      猜你喜欢
      • 2014-02-15
      • 1970-01-01
      • 2013-11-29
      • 1970-01-01
      • 2011-03-17
      • 2019-10-07
      • 1970-01-01
      • 1970-01-01
      • 2017-11-22
      相关资源
      最近更新 更多