gpt4 book ai didi

java - 无法计算构建计划 : Plugin org. apache.maven.plugins :maven-resources-plugin:2. 6 或其依赖项之一无法解析

转载 作者:搜寻专家 更新时间:2023-10-30 19:57:49 34 4
gpt4 key购买 nike

当我尝试构建项目时出现此错误。

Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'ProjectName'.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6

我的Java版本是1.8,Maven版本是3.2.5

而且当我第一次在我的计算机上配置 Maven 时,我检查 Maven 使用 mvn --version 命令配置是否正确,它工作正常。但是在重新启动我的计算机并检查 Maven 是否正常工作之后。然后它说:

C:\Users\User Name>mvn --version
'mvn' is not recognized as an internal or external command,
operable program or batch file.

最佳答案

尝试以下步骤:

  1. 确保您有连接(可以浏览)(这种错误通常是由于与 Internet 连接造成的)

  2. 下载Maven并解压

  3. 创建一个JAVA_HOME系统变量

  4. 创建一个M2_HOME系统变量

  5. %JAVA_HOME%\bin;%M2_HOME%\bin; 添加到您的 PATH 变量

  6. 打开命令窗口 cmd。检查:mvn -v

  7. 如果您有代理,则需要对其进行配置

http://maven.apache.org/guides/mini/guide-proxies.html

  1. 确保你有 .m2/repository(清除下面所有的文件夹和文件)

  2. 如果您打算使用 Eclipse,则需要创建 settings.xml

Maven plugin in Eclipse - Settings.xml file is missing

您可以在

中查看更多详细信息

http://maven.apache.org/ref/3.2.5/maven-settings/settings.html

关于java - 无法计算构建计划 : Plugin org. apache.maven.plugins :maven-resources-plugin:2. 6 或其依赖项之一无法解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28145877/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com