无法计算构建计划:插件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

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

问题描述

当我尝试在eclipse中创建一个Maven项目时,我收到以下错误消息。许多人已经在settings.xml文件中发布了代理,并且还刷新.m2文件夹,迫使它下载一个新文件。这些都不适合我。我正在上班,代理设置在互联网选项中有效。



错误信息:

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

POM.XML:

 < project xmlns =http://maven.apache .org / POM / 4.0.0xmlns:xsi =http://www.w3.org/2001/XMLSchema-instancexsi: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.blahhhhhhhhhhhhhhhhhhhh< / groupId>
< artifactId> HelloRESTEasy< / artifactId>
< version> 0.0.1-SNAPSHOT< / version>
< / project>




settings.xml:

 <代理> 
<代理>
< id>可选< / 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>
< /代理>


解决方案

我现在解决了。但是,它只能在Netbeans中解决。新新新旗新新200新新新旗新新旗新新旗新新旗新新旗新新旗新新旗旗新旗新新旗新新旗新新旗旗规200旗新新旗新然而,解决方案是删除/评论settings.xml中的用户/密码参数



之前:

 <代理> 
<代理> 200新X-4545 X- 20045 X- 20045 X- 20045 X- 20045 X- 20045 X- 20045 X-
< 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>
< /代理>

之后:

 code><代理> 
<代理>
< id>可选< / id>
< active> true< / active>
< protocol> http< / protocol>
< host> proxyserver.company.com< / host>
< port> 8080< / port>
< nonProxyHosts> local.net | some.host.com< / nonProxyHosts>
< / proxy>
< /代理>


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.

The error message:

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:

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



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>

解决方案

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

Before:

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

After:

<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天全站免登陆