【发布时间】:2018-12-05 14:47:49
【问题描述】:
我正在尝试使用 maven 安装 Jsoup 库。 我已按照所有步骤操作,但每次都遇到同样的错误:
[INFO] Building jsoup Java HTML Parser 1.12.1-SNAPSHOT [INFO]
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.0.1/maven-resources-plugin-3.0.1.pom [INFO]
[INFO] BUILD FAILURE [INFO]
[INFO] Total time: 0.902 s [INFO] Finished at: 2018-06-26T12:36:38-07:00 [INFO] Final Memory: 8M/119M [INFO]
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.0.1: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:3.0.1 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 [ERROR]
这个我解决不了,(我的java home和path都设置好了)。
java目录名称:java-8-oracle.
java version: java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
【问题讨论】:
-
@AlfredoPipoli,你能在这里发布 pom.xml 文件吗?
-
@Alfredo Pipoli,有时你只需要清理你的项目,删除 .m2 存储库并重新运行 maven install。