gpt4 book ai didi

java - m2eclipse 不会下载任何依赖项

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:13:15 25 4
gpt4 key购买 nike

我希望有人能提供帮助。

在全新的 Windows 机器上。在下载并运行最新版本的 eclipse (indigo) 之前,我已经下载并安装了 java jdk。

我从那里安装了来自市场的 maven 集成插件并创建了一个新的 maven 项目。

该项目存在大量错误,主要与缺少依赖项或生命周期管理有关。

当我执行 maven-clean 时,我收到以下错误消息:

[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://repo1.maven.org/maven2): Invalid argument: getsockname to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom -> [Help 1]

我不在防火墙后面,也不使用代理。我的 maven settings.xml 和我的 maven 项目一样是完全默认的。没有添加任何类,也没有向 pom 添加任何内容。

有人能帮忙吗?

祝一切顺利

p.s 这里是 pom 中显示的错误:

1:

CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.3.2 from/to central (http://repo1.maven.org/maven2): Invalid argument: getsockname to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom

2:

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (execution: default-testCompile, phase: test-compile)

3:

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile)

4:

Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to central (http://repo1.maven.org/maven2): Invalid argument: getsockname to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom

最佳答案

此外,我建议首先使用 Maven (Maven 3.0.X) 的命令行客户端而不是在 Eclipse 中测试配置等。

1./4.显示您已尝试下载一些因任何原因而失败的 Artifact 。简单的解决方案是删除本地存储库并重试构建。但我建议首先在命令行上执行此操作以检查是否一切正常。

2./3.有迹象表明您正在尝试编译的项目不包含 m2e which can be read in the docs 的正确插件覆盖率如何解决。

关于java - m2eclipse 不会下载任何依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10825182/

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