Maven異常:Could not find artifact xxxx:pom


https://blog.csdn.net/qq_30059235/article/details/108562275

1. maven報錯

因為是聚合工程,每個子模塊的pom里面都有個

<parent>
    <groupId>com.xxx</groupId>
    <artifactId>xxxx</artifactId>
    <version>1.0-SNAPSHOT</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

在執行 mvn clean 、mvn install 等時都會報錯 Could not find artifact xxxx:pom
解決辦法: 刪掉
解釋:這個標簽的意思是:父項目的pom.xml文件的相對路徑。相對路徑允許你選擇一個不同的路徑。默認值是../pom.xml。Maven首先在構建當前項目的地方尋找父項 目的pom,其次在文件系統的這個位置(relativePath位置),然后在本地倉庫,最后在遠程倉庫尋找父項目的pom。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM