且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法计算构建计划:插件org.apache.maven.plugins:maven-jar-plugin:2.3.2或其依赖关系无法解析

更新时间:2022-10-19 16:59:05

我现在解决了。但是,它只能在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>&LT;代理&GT; 
<代理>
< 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>