jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-2743

Dependency poms not timely merged with parents

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Blocker Blocker
  • Resolution: Unresolved
  • Affects Version/s: 2.0.4, 2.0.6
  • Fix Version/s: Issues to be reviewed for 3.x
  • Component/s: Artifacts and Repositories, Dependencies
  • Labels:
    None
  • Complexity:
    Intermediate

Description

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
Downloading: http://repo1.maven.org/maven2/org/apache/avalon/framework/avalon-framework-impl/4.3/avalon-framework-impl-4.3.pom
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
[DEBUG] Artifact not found - using stub model: Unable to download the artifact from any repository
 
  org.apache.avalon.framework:avalon-framework-impl:pom:4.3
 
from the specified remote repositories:
  central (http://repo1.maven.org/maven2)
 
[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
Downloading: http://repo1.maven.org/maven2/org/apache/avalon/framework/avalon-framework-impl/4.3/avalon-framework-impl-4.3.jar
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
// 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
Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/avalon/framework/avalon-framework-impl/4.3/avalon-framework
-impl-4.3.jar
2/56K^M3/56K^M7/56K^M8/56K^M9/56K^M13/56K^M17/56K^M19/56K^M20/56K^M24/56K^M28/56K^M32/56K^M36/56K^M40/56K^M42/56K^M43/56K^M44/56K^M46/
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.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wendy Smoak added a comment - 03/Jun/07 9:36 AM

Also affects 2.0.6 per Grzegorz Kossakowski on #maven.

Show
Wendy Smoak added a comment - 03/Jun/07 9:36 AM Also affects 2.0.6 per Grzegorz Kossakowski on #maven.
Hide
Permalink
Benson Margulies added a comment - 27/Jun/11 6:58 PM

This issue has been sitting for a long time with no test case. If no one can provide one in a week or two, I will close it.

Show
Benson Margulies added a comment - 27/Jun/11 6:58 PM This issue has been sitting for a long time with no test case. If no one can provide one in a week or two, I will close it.

People

  • Assignee:
    Unassigned
    Reporter:
    Kenney Westerhof
Vote (2)
Watch (1)

Dates

  • Created:
    06/Jan/07 9:49 AM
    Updated:
    27/Jun/11 6:58 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.