Could not calculate build plan Maven设置代理
来源:互联网 发布:php 自己开发mvc框架 编辑:程序博客网 时间:2024/05/19 18:11
一、问题
搭建spark环境 , 创建Maven 新项目的时候,一直报错:
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
二、原因
到maven目录(在eclipse的 window->Maven->user settings 可以看到) .m2\repository\org\apache\maven\plugins\maven-resources-plugin\2.6 下, 随机选择一个文件打开。。 发现有连接超时 应该是部分依赖jar 外网不能访问到。。
三、解决办法:
1. 配置Maven 代理
1.1 在目录.m2 下创建 settings.xml
1.2 settings.xml 添加下文(红色部分换为自己的外网代理和端口)
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies>
<proxy>
<id>http</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>proxy.xxx</host>
<port>8080</port>
<nonProxyHosts>localhost:127.0.0.1</nonProxyHosts>
</proxy>
<proxy>
<id>https</id>
<active>true</active>
<protocol>https</protocol>
<username></username>
<password></password>
<host>proxy.xxx</host>
<port>8080</port>
<nonProxyHosts>localhost:127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
<profiles/>
<activeProfiles/>
</settings>
2、删除目录 .m2\repository\org\apache\maven\plugins
3、 再新建 Maven 项目
四、其他解决办法
- Could not calculate build plan Maven设置代理
- maven问题解决“Could not calculate build plan...”
- Could not calculate build plan
- Could not calculate build plan
- Could not calculate build plan
- maven问题之Could not calculate build plan:
- maven创建项目报Could not calculate build plan...
- [问题解决] maven: Could not calculate build plan: xxx
- maven 出现错误:Could not calculate build plan
- 解决Maven的Could not calculate build plan的方法
- Maven:解决“Could not calculate build plan”问题
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.4
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.4
- 新系统中导入maven失败出错,Could not calculate build plan
- 06 maven问题 "Could not calculate build plan: Plugin 'jarPrefix':'jarName':'jarVersion' "
- leetcode 78. Subsets
- D3_collections系列
- 回文解码
- 如何用数据来做渠道效果的分析(工具篇)
- 算法优解(2)-猫狗队列
- Could not calculate build plan Maven设置代理
- "Unexpected value from nativeGetEnabledTags: 0"log的过滤
- 【程序员面试金典】像素翻转
- Zigbee协议栈--Z-Stack的使用
- java环境变量配置
- BZOJ 2754 [SCOI2012]喵星球上的点名
- eclipse如何添加svn插件?
- Qt如何加入Objective-C代码(包含如何查找Objective-C的库)
- 直播技术选型