- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
上周我的笔记本电脑更新到了 Windows 10。从那时起,intelliJ 抛出了 Maven 相关的错误,我一直无法解决这些错误。我的所有 Maven 插件都以红色突出显示,并显示错误:“无法读取(依赖项)的 Artifact 描述符。”。每个插件和依赖项都会发生这种情况。我还应该提到这是一个适用于其他所有人的克隆项目,因此问题不在于 pom。
我尝试了很多选项来解决此问题,包括:1. 使缓存失效/重启2.重新导入项目3.重新导入Maven依赖项。4.删除intelliJ.iml和.idea文件夹。5. 进行 Maven 全新安装(稍后会谈到这一点)。6. 执行 git pull 并重新导入。7.安装外部Maven(最新版本),将其添加到环境变量和intelliJ中。
下面是我尝试运行时控制台的错误输出:
"C:\Program Files (x86)\Java\jdk1.8.0_31\jdk1.8.0_31\bin\java" "-Dmaven.home=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.2\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=**** "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.1.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.1.2 clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for (redacted)
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 78, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building (redacted)SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.923s
[INFO] Finished at: Wed Jan 10 15:26:17 EST 2018
[INFO] Final Memory: 6M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [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
Process finished with exit code 1
CMD 提示尝试版本/全新/全新安装我得到以下结果:
C:\Users\(redacted)\(redacted)\(redacted)>mvn clean
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for (redacted)-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 73, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building (redacted) 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.697 s
[INFO] Finished at: 2018-01-11T10:09:44-05:00
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [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
C:\Users\(redacted)\repos2\gpp-automated-testing>
最后,当我运行 mvn clean -e 查看详细错误时,我收到以下错误:
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org
Caused by: org.apache.maven.wagon.TransferFailedException: repo.maven.apache.org
Caused by: java.net.UnknownHostException: repo.maven.apache.org
我尝试 ping 主机,但不确定哪一个是 ping 主机的正确方法,所以我尝试了所有方法。
C:\Users\(redacted)\repos2\(redacted)>ping http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Ping request could not find host http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom. Please check the name and try again.
C:\Users\(redacted)\repos2\(redacted)>ping http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Ping request could not find host http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom. Please check the name and try again.
C:\Users\(redacted)\repos2\(redacted)>ping http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/
Ping request could not find host http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/. Please check the name and try again.
C:\Users\(redacted)\repos2\(redacted)>ping http://repo.maven.apache.org
Ping request could not find host http://repo.maven.apache.org. Please check the name and try again.
最佳答案
好吧...您遇到了 DNS 问题...这意味着逻辑名称:repo.maven.apache.org
无法转换为 IP 地址...这是一个问题你的操作系统和网络管理员...所以你的pom和intellij没问题...
更新:如果您有公司存储库,则需要在 .m2/settings.xml
文件中添加公司存储库...在 Windows 中,该文件夹位于您的用户系统文件夹
关于java - intelliJ 中的 Maven 无法读取 Artifact 描述符 - 启用快照更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48210453/
对于 Nexus 中的 Artifact ,我想找出类路径,即该 Artifact 是针对哪个 Artifact 的哪个版本构建的。当然,解析pom会给出一些提示,但由于我们有父POM、依赖管理等,这
我想将库部署到公司的远程存储库。 这是我第一次要将库项目部署到远程存储库。 我收到以下错误消息: org.sonatype.aether.transfer.ArtifactNotFoundExcept
在我们的 Artifact 上,我们有POM文件为 commons-lang commons-lang 2.6 4.0.0 commons-lang commons-la
我们使用 Maven 来构建我们的项目,并使用 Nexus 作为存储库管理器。 有没有办法知道一个 Artifact 在哪里是另一个 Artifact 的依赖项? 例如,我们想知道我们的发布存储库中的
我已经重新初始化了我的 pom.xml,但是我得到了: ArtifactDescriptorException: Failed to read artifact descriptor for org.
将maven Android 项目导入eclipse 时出现以下错误: Could not update project assistance configuration me.gladwell.
假设,ArtifactA 依赖于 ArtifactB,ArtifactC 也依赖于 ArtifactB 我知道“mvn dependency plugin”可以帮助列出项目/Artifact 的依赖项
在我的 Maven 构建结束时,一个用于此明确目的的模块从各种其他模块收集 Artifact ,并使用 Assembly 插件将它们压缩到一个存档中。完成后,它会使用 Deploy 插件将它们部署到
我有一个我正在尝试构建的相对较新的项目。 Gradle 同步正常,但每当我尝试构建时,都会收到如下错误: Execution failed for task ':app:kaptGenerateStu
我在 Azure DevOps 中设置了 Gradle 构建,它在 Azure DevOps git 存储库中编译代码,然后将生成的 JAR(作为 Maven Artifact )发布到 Azure
提出这个问题的另一种方式是: 如何验证maven使用 Azure 进行项目 personal access token这样Maven构建就可以下载artifacts发表于Azure Artifacts
提出这个问题的另一种方式是: 如何验证maven使用 Azure 进行项目 personal access token这样Maven构建就可以下载artifacts发表于Azure Artifacts
这与具有类似错误的现有问题有点不同 - 我不认为这是重复的。 我有项目 A,我使用 mvn clean install 在本地成功构建并安装了该项目。 我验证了director中存在jar和pom~/
我有一个包含此存储库的 Artifact 服务器 发布 锁定版本 我必须将一些 Artifact (大约 50.000 个)从版本移至锁定版本... 我需要识别具有精确版本的 Artifact : 例
我正在升级一个拥有 3000 多个 java maven 项目和 repos 的庞大系统,从 Java 7 部署到 Java 8。我们将尝试一次迁移部分系统,这意味着一些 Artifact 会使用 j
所以我遇到了一个错误 Failed to read artifact descriptor对于已部署到我本地 Nexus 的插件。我检查了 Nexus 上的 pom。 这个插件依赖于 Maven 2.
在 Azure DevOps 中,我们有 Download/Publish构建工件任务和 Download/Publish管道工件任务。 构建工件任务和管道工件任务之间有什么区别,我们什么时候会选择一
我有一个由 Maven 管理的原始 java webapp(因此会生成一个 WAR 文件),我们称它为 webapp。 我喜欢保持其 Maven 配置不变,但有时我需要通过操作其内容(或以任何方式对其
我有一个 Artifact abc,它有一些测试。我的存储库中有不同版本的 abc。我现在希望能够针对项目的“旧版本”运行最新的测试。 我试图将 Artifact 本身添加到测试依赖项中,但这(当然)
我目前有一个用 Maven 构建的 Java 测试库,并作为 jar 分发。我的项目依赖于一个非常常见的库 (Objectweb ASM),而且我遇到了一些问题,即类路径中已经存在较早且不兼容的 AS
我是一名优秀的程序员,十分优秀!