relativePath 是Maven為了尋找父模塊pom.xml所額外增加的一個(gè)尋找路徑
relativePath 默認(rèn)值為 …/pom.xml
Maven 尋找父模塊pom.xml 的順序如下:
(1) first in the reactor of currently building projects
這里一個(gè)maven概念 反應(yīng)堆(reactor ),
意思就是先從工程里面有依賴相關(guān)的模塊中找你引入的parent 的pom.xml,
(2) then in this location on the filesystem然后從 你定義的 <relativePath > 路徑中找,
當(dāng)然你如果只是 / 即空值,則跳過(guò)該步驟,
默認(rèn)值 ../pom.xml 則是從上級(jí)目錄中找啦。
(3) then the local repository
這個(gè)就不說(shuō)了,如果 (1) (2) 步驟沒(méi)有則從 本地倉(cāng)庫(kù)找啦。
(4) and lastly in the remote repo
最后只能從遠(yuǎn)程倉(cāng)庫(kù)找啦,再找不到就報(bào)錯(cuò)給你看