由于插件依赖性而导致Maven构建失败

时间:2017-03-22 04:04:49

标签: maven tomcat8 liferay-7

我已经阅读了类似主题的以下先前答案,但没有一个对我有效。

以下是我尝试过的内容: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

Maven Build Failure - failure to find plugins

第一个链接并不真正适用,因为我没有使用代理,但我确实检查了settings.xml文件以了解其他可能性。我可以通过转到插件.jar文件直接下载。

第二个链接可能适用,但我不知道它们的含义:"更改用户设置以指出更正settings.xml和您的存储库文件夹应存在于您的系统中。"我不知道如何做到这一点,我不确定他们指的是哪个存储库以及我如何找到它。我只关注我的Maven settings.xml文件。

所以我的错误

    C:\cas-overlay-template-master>mvn package install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cas-overlay 1.0
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.3/maven-compiler-plugin-3.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.965 s
[INFO] Finished at: 2017-03-21T23:42:13-04:00
[INFO] Final Memory: 7M/97M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.3 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:jar:3.3 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [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/PluginResolutionException

我的目标是让CAS 5.0.4为Liferay 7.0ga3工作,运行Tomcat 8,JDK 1.8和Maven 3.我是学生,除了JDK 1.8之外从未使用过任何这些技术,所以我真的需要非常可以理解的答案。对那些应该知道自己在做什么的人来说,不是老手的答案。感谢

1 个答案:

答案 0 :(得分:1)

这里的实际问题是Maven JVM信任的证书:

  

意外错误:java.security.InvalidAlgorithmParameterException:   trustAnchors参数必须为非空

可以解决各种问题,但this question有很多解决方案(还有一个here)。