Skip to content

Add cross-repo Maven library dependency links #440

Description

@nvt-pankajsharma

Problem

cross-repo-intelligence currently links services through HTTP/async/channel style edges, but it does not expose cross-repo library dependency relationships. In a multi-repo Maven platform this makes it hard to answer questions like:

  • which services depend on a shared library artifact?
  • which service repos consume a shared library artifact?
  • where is a shared artifact referenced through direct dependencies or Maven exclusions?

This came up while indexing independent repositories into the same CBM_CACHE_DIR; the desired relationship is library usage, not just HTTP calls.

Proposed behavior

When index_repository runs in cross-repo-intelligence mode, it should also match Maven artifacts across indexed projects:

  • read indexed pom.xml files for the source project
  • collect Maven dependency coordinates from actual <dependencies> blocks
  • read indexed pom.xml files for target projects
  • collect each target project Maven artifact coordinates
  • when source dependency coordinates match a target artifact, emit cross-repo library edges

Suggested edge types:

  • CROSS_LIBRARY_DEPENDS_ON in the consumer/source project
  • CROSS_LIBRARY_USED_BY in the provider/target project

The output summary and architecture cross-repo summary should include these new edge types.

Scope

This issue is intentionally scoped to Maven pom.xml support. Gradle, npm, Go modules, Python packages, and richer code-level import-to-artifact resolution can be separate follow-up issues.

Tests

Add focused regression tests that build temporary provider/consumer projects with neutral Maven coordinates and assert library edge creation, valid JSON edge properties, and no false positives from dependency-management-only declarations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparsing/qualityGraph extraction bugs, false positives, missing edgespriority/normalStandard review queue; useful PR with ordinary maintainer urgency.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions