Maven parent.relativePath 说明


 

  1. relativePath 是Maven为了寻找父模块pom.xml所额外增加的一个寻找路径
  2. relativePath 默认值为 …/pom.xml
  3. 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
     这个还用说吗,上面都找不到了,最后只能从远程仓库找啦,再找不到就报错给你看 

 

转载:https://blog.csdn.net/gzt19881123/article/details/105255138

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM