栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

NetBeans8.2清理并构建失败,提示Download nbm-maven-plugin3.9失败,Return code is: 501 , ReasonPhrase:HTTPS Require

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

NetBeans8.2清理并构建失败,提示Download nbm-maven-plugin3.9失败,Return code is: 501 , ReasonPhrase:HTTPS Require

【问题原因】
    用户文件夹下的.m2文件夹内的setting.xml文件未生效,导致下包失败。
    核心原因未知,没查到,反正他就没生效,所以网络上的各种解决501的问题都失败,因为根本没有在这里走,修改pom或者setting都不管用。
【解决方案】
    修改NetBeans安装文件夹下的mavenconfsetting.xml的mirror标签与未生效setting一致(替换了也行)
【扩展】
    这个问题的核心,不是501,不是jdk版本,而是setting未生效,注意观察构建输出的最上方cd进的maven文件夹,是NetBeans的maven,所以他应该走的是maven默认的setting,而不是用户.m2下的。

【报错内容】

Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/nbm-maven-plugin/3.9/nbm-maven-plugin-3.9.pom

The build could not read 1 project -> [Help 1]
  
  The project 【公司项目地址】) has 2 errors
    Unresolveable build extension: Plugin org.codehaus.mojo:nbm-maven-plugin:3.9 or one of its dependencies could not be resolved: Failed to collect dependencies for org.codehaus.mojo:nbm-maven-plugin:jar:3.9 (): Failed to read artifact descriptor for org.codehaus.mojo:nbm-maven-plugin:jar:3.9: Could not transfer artifact org.codehaus.mojo:nbm-maven-plugin:pom:3.9 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/codehaus/mojo/nbm-maven-plugin/3.9/nbm-maven-plugin-3.9.pom. Return code is: 501, ReasonPhrase: HTTPS Required. -> [Help 2]
    Unknown packaging: nbm-application @ line 12, column 16

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/919182.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号