1. 程式人生 > 實用技巧 >IDEA的pom檔案總是出現Failed to read artifact descriptor forXXX:jar:unknow的解決方法

IDEA的pom檔案總是出現Failed to read artifact descriptor forXXX:jar:unknow的解決方法

IDEA在匯入jdbc包時,pom檔案出現:Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-jdbc。

解決方法:將倉庫的地址換為阿里雲的倉庫,重新匯入依賴,錯誤消失!

<!--修改倉庫為阿里雲-->
    <repositories>
        <repository>
            <id>aliyun-repos</id>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</
url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>aliyun-plugin</id> <url
>http://maven.aliyun.com/nexus/content/groups/public/</url> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories>