Why do I get invalid pom due to missing dependency

2019-04-29 20:23发布

问题:

I have case that looks like this:

super

  • dependency manangement of thrid-party

parent-pom

  • child of super

projectA

  • child of parent-pom
  • dependency to third-party

projectB

  • child of parent-pom
  • dependency to projectA

projectA builds just fine, but when I try to compile projectB I get:

[WARNING] The POM for [projectA] is invalid, transitive dependencies (if any) will not be available: 1 problems were encountered while building the effective model for [projectA]

[ERROR] 'dependencies.dependency.version' for thrid-party.jar is missing. @

Any idea why?

回答1:

You need to install super to you local repo, just having relativePath set is not enough for this case.