Maven Integration for Eclipse
  1. Maven Integration for Eclipse
  2. MNGECLIPSE-1227

m2Eclipse can't find parent POM from workspace index


    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.9.7
    • Fix Version/s: None
    • Component/s: Dependency Resolver
    • Labels:
    • Environment:
      Eclipse 3.4.2 (M20090211-1700), Maven Integration for Eclipse
    • Number of attachments :


      "Cannot find artifact for parent POM" error.

      Works: Simple parent/child relation where parent is <packaging>pom</packaging> and is actually the parent on the file system.

      Doesn't work: Any configuration where <parent/> is not also the parent on the file system. Non-feasible work-around is to run "maven install" on the parent to include it in the local-repository, which resolves the error. Parent artifact is shown in the "Maven Indexes" Eclipse view regardless, so it should be resolvable from there.

      Use-case: Typical parent project with separate modules. Building the parent project causes all included modules to also build, etc. No issues here. However, having the file-system parent also be the POM parent requires checking-out the parent from source control, which includes all child modules as well - making it practically impossible to check-out and work on only one module. Better approach would be the following layout:

      • MyProject
        • MyProject_MavenParent
        • MyProject_Module1
        • MyProject_Module2

      MyProject_MavenParent contains shared settings for organization, developers, repositories, properties, and default build, resources, and plugin settings. It is set as the parent POM to both MyProject, MyProject_Module1, and MyProject_Module2. This allows a user to only checkout MyProject_Module1 MyProject_MavenParent, MyProject_Module2 + MyProject_MavenParent, or the entire MyProject. This is currently not feasible given the error.

      An alternate possible layout that also doesn't currently work:

      • MyProject
        • MyProject_Module1
        • MyProject_Module2
      • MyProject_MavenParent

      There is the <relativePath/> element that can be used in pom.xml. While I've not tried this, it introduces unnecessary and undesirable "hard-coding" of paths, even when relative paths are used. User should be able to check-out different modules to different local paths, which would cause any such paths to not resolve.


        There are no entries against this issue.


          • Assignee:
            Mark Ziesemer


            • Created: