Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Mercury DependencyTreeBuilder/VirtualRepositoryReader classes is an attempt to fully utilize the advantages that the Jetty HTTP transport and SAT-based conflict resolver give us. It's also required in order to implement the version ranges discussed in Mercury Version Ranges. This page is a brainstorm design of the Dependency building algorithm.

Dependency builder is given a root GAV and it's task is to:

  1. build a tree of all possible dependencies
  2. resolve conflicts (remove same GAs from the tree) to produce a flat set of GAVs that constitute calculated classpath (or dependency graph in case of OSGi) for a given scope

Given that #1 is done, the algorithm is described here, this page concentrates on #1 - how "dirty" dependency tree is constructed.

First, DependencyTreeBuilder is given a List of Repositories (Not Set - ordering matters) and implementation of MetadataProcessor. MetadataProcessor abstracts reading and parsing of GAV metadata a.k.a. POMs. Because we don't need entire POM, just interpolated dependencies section of it, we can to try move them out in the future - there was a discussion on dev@ list about it.