Maven (moved to ASF)
  1. Maven (moved to ASF)
  2. MNG-2743

Dependency poms not timely merged with parents


    • Complexity:
    • Number of attachments :


      POM's of dependencies are not properly merged with their parents.
      It could be that they're not merged at all, or only partly. Since the code to merge poms is the same
      everywhere, and <repository> tags are merged for local poms, I fear that they're not merged at all.

      With this setup:

      • local workspace:
        • project A
          • depends on remote artifact B, residing in 'central'
      • repository central:
        • artifact B (cocoon-core)
          • has parent P (cocoon), also here at central
          • declares a dependency on D, residing in repo R (not a standard repository)
        • pom P, declares repository R
      • repository R:
        • artifact D (avalon-framework-impl)
          • declares dependency on lib L, also here at repository R
        • artifact L (avalon-framework-api)

      When running mvn install on local project A, observe the following log:

      // cocoon-core has been resolved, now it's dependency poms are resolved:
      [DEBUG] Trying repository central
      [WARNING] Unable to get resource from repository central (
      [DEBUG] Artifact not found - using stub model: Unable to download the artifact from any repository
      from the specified remote repositories:
        central (
      [DEBUG] Using defaults for missing POM org.apache.avalon.framework:avalon-framework-impl:pom:4.3:compile
      // note: above, the parent of cocoon-core (B) (which is cocoon (P)), is not merged, as the repo R is not
      // visible in B to resolve D
      // now, the artifacts themselves are downloaded 
      [DEBUG] Trying repository central
      [WARNING] Unable to get resource from repository central (
      // Here, repo R _is_ used to search, which means that the parent P is merged with B and the repo is available
      [DEBUG] Trying repository apache.snapshot
      56K^M47/56K^M49/56K^M50/56K^M52/56K^M53/56K^M54/56K^M56/56K^M56K downloaded
      [DEBUG]   Artifact resolved

      The problem here is that the jar is now available in the local repo, but the pom is not, and the dependencies of D aren't downloaded.

      It seems pom B is only merged with P after all dependency poms for B have been resolved.


        No work has yet been logged on this issue.


          • Assignee:
            Kenney Westerhof


            • Created: