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