跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • maven 中心源地址更新为 https 的问题
未分類
28 3 月 2020

maven 中心源地址更新为 https 的问题

maven 中心源地址更新为 https 的问题

資深大佬 : liangzai 63

声明:使用 maven 中心仓库遇到的问题,如果是阿里源可能没啥问题

刚才 java 编译打包 maven 工程时,一直报错,看了下是 Maven dependencies are failing with a 501 error: user https://repo.maven.apache.org/maven2 …

于是查了下资料,参照修改了下本地配置.估摸着大家也会有这个问题吧.方案如下(不一定是唯一的): 1.Add a repository in your project´s pom.xml file

<project> <repositories> <repository> <id>central maven repo</id> <name>central maven repo https</name> <url>https://repo.maven.apache.org/maven2</url> </repository> </repositories> </project>

2.Add the repository into a profile in the settings.xml file.

<profile> <id>my profile</id> <repositories> <repository> <id>central maven repo</id> <name>central maven repo https</name> <url>https://repo.maven.apache.org/maven2</url> </repository> </repositories> </profile> 3.Update you maven version to a new one that uses https values as default. The lastest one at this moment 3.6.3 Download here( https://maven.apache.org/download.cgi)

google 资料的地址为 https://stackoverflow.com/questions/59763531/maven-dependencies-are-failing-with-a-501-error 大家也可以自行去看一下. 希望可以帮助到大家.

大佬有話說 (0)

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具