“插件org.apache.maven.plugins:maven-resources-plugin:2.6和插件org.apache.maven.plugins:maven-compiler-plugin:3.1- connect timed out”

新的Maven项目是在eclipse中创建的 . 但是Pom.xml显示了一些错误 .

“无法计算构建计划:插件org.apache.maven.plugins:maven-resources-plugin:2.6或其中一个依赖项无法解析:无法读取org.apache.maven.plugins的工件描述符:maven- resources-plugin:jar:2.6插件org.apache.maven.plugins:maven-resources-plugin:2.6或其中一个依赖项无法解析:无法读取org.apache.maven.plugins的工件描述符:maven-resources -plugin: jar :2.6"

“org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from / to central(https://repo.maven.apache.org/maven2):connect timed out”

如何解决它 .

请注意:项目是从命令提示符获取构建 .

回答(1)

2 years ago

在这个Maven项目中有两个错误 . 一个是“ org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): connect timed out

Solution :这是由于连接问题,从您的系统中无法访问Meven存储库,或者您无权访问或下载存储库 . 为此,请检查maven的settings.xml中的代理设置 . 如果设置正确,则您的域阻止了回购站点 .

然后通过允许的镜像为您的域下载插件 .

第二是

"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"

Solution :这可能是您在捆绑中安装的eclipse M2e连接器 . 更新连接器 . 我已经通过 "M2E connector for the Eclipse JDT Compiler" 解决了 .