无法计算构建计划:无法解析插件 org.apache.maven.plugins:maven-jar-plugin:2.3.2 或其依赖项之一 [英] Could not calculate build plan: Plugin org.apache.maven.plugins:maven-jar-plugin:2.3.2 or one of its dependencies could not be resolved

查看:55
本文介绍了无法计算构建计划:无法解析插件 org.apache.maven.plugins:maven-jar-plugin:2.3.2 或其依赖项之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 Eclipse 中创建 Maven 项目时收到以下错误消息.许多人在 settings.xml 文件中发布了有关代理的信息,并且还刷新了 .m2 文件夹,迫使它下载一个新的.这些都不适合我.我正在工作,代理设置在 Internet 选项中处于活动状态.

I got the following error message when I tried to create a Maven project in eclipse. Many have posted about proxies in settings.xml file and also flush the .m2 folder forcing it to download a new one. None of this is working for me. I'm at work, with proxy settings active in the internet options.

错误信息:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5

POM.XML:

POM.XML:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.blahhhhhhhhhhhhhhhhh</groupId>
  <artifactId>HelloRESTEasy</artifactId>
  <version>0.0.1-SNAPSHOT</version>
</project>



设置.xml:



settings.xml:

  <proxies>
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxyserver.company.com</host>
      <port>8080</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
  </proxies>

推荐答案

我现在解决了.但是它只能在 Netbeans 中解决.不知道为什么 Eclipse 仍然不会采用已更改的 settings.xml.然而,解决方案是删除/注释 settings.xml 中的用户/密码参数

I solved it now. However it only is solved in Netbeans. Not sure why eclipse still won't take the settings.xml that is changed. The solution is however to remove/comment the User/Password param in settings.xml

之前:

<proxies>
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxyserver.company.com</host>
      <port>8080</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
  </proxies> 

之后:

<proxies>
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxyserver.company.com</host>
      <port>8080</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
  </proxies> 

这篇关于无法计算构建计划:无法解析插件 org.apache.maven.plugins:maven-jar-plugin:2.3.2 或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆