cubbles / cubx.core.rte

Contains the artifacts for the in-browser runtime-environment.
https://cubbles.atlassian.net/wiki/display/RTE
1 stars 1 forks source link

Refactor DependencyTree to be able to identify and remove artifact version conflicts during duplicates removal #12

Closed pwrinc closed 6 years ago

pwrinc commented 6 years ago

The idea is to handle artifact version conflicts the same way we handle duplicate removal. In addition we consider two nodes are equal if the artifactId and the groupdId.webpackageName values are equal.

The algortihm for removal is as follows:

  1. Traverse the dependencyTree in breadth first order and check for multiple occurances of the same artifact. This traversal order ensures a shortestPath lookup for selecting a node in the context of removing duplicates.
  2. If there are multiple nodes considers equal (see above) we just use the first occurance of that node and remove all other occurances of that node. Note: To keep information about the parent-child relationship for removed nodes the usesExisting and usedBy properties need to be set correctly!
  3. As a result duplicates and artifact version conflicts are removed.

Tasks: