Non-resolvable parent POM using Maven 3.0.3 and relativePath notation

后端 未结 8 2195
既然无缘
既然无缘 2021-02-03 21:19

After migrating to Mavent 3.0.3 Parent poms in several Projects cannot be resolved anymore.

The Projects are structured in a default manner, so I set parent.relativePath

相关标签:
8条回答
  • 2021-02-03 22:10

    You need to check your relative path, based on depth of your modules from parent if module is just below parent then in module put relative path as: ../pom.xml

    if its 2 level down then ../../pom.xml

    0 讨论(0)
  • 2021-02-03 22:19

    I had the same problem. My project layout looked like

    \---super
        \---thirdparty
            +---mod1-root
            |   +---mod1-linux32
            |   \---mod1-win32
            \---mod2-root
                +---mod2-linux32
                \---mod2-win32
    

    In my case, I had a mistake in my pom.xmls at the modX-root-level. I had copied the mod1-root tree and named it mod2-root. I incorrectly thought I had updated all the pom.xmls appropriately; but in fact, mod2-root/pom.xml had the same group and artifact ids as mod1-root/pom.xml. After correcting mod2-root's pom.xml to have mod2-root specific maven coordinates my issue was resolved.

    0 讨论(0)
提交回复
热议问题