欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

如何解決Maven出現(xiàn)Could not find artifact的問題

 更新時間:2024年04月02日 15:21:13   作者:開某人214  
這篇文章主要介紹了如何解決Maven出現(xiàn)Could not find artifact的問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教

問題描述

在IDEA創(chuàng)建Spring Initializr項目,選擇下載依賴時

項目構(gòu)建時爆出:

Could not find artifact com.mysql:mysql-connector-j:pom:unknown in central (https://repo.maven.apache.org/maven2)

解決辦法

假如settings.xml 指定阿里云源

mirror僅僅配置central的代理鏡像

其它倉庫通過settings文件的profile或pom文件來配置

可以通過IDEA中maven的配置找到該文件位置

(構(gòu)建工具 ——Maven——用戶設(shè)置文件)

settings.xml文件配置內(nèi)容

<?xml version="1.0" encoding="UTF-8"?>
 
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
 
 
  <pluginGroups>
 
  </pluginGroups>
 
  <proxies>
 
  </proxies>
 
  <servers>
 
  </servers>
  <mirrors>
    <mirror>
        <id>aliyun-maven-mirror</id>
        <mirrorOf>centeral</mirrorOf>
        <name>阿里云公共倉庫</name>
        <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
  </mirrors>
 
  <profiles>
 
  </profiles>
 
</settings>

然后重新構(gòu)建,就不會報Could not find artifact

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論