graphify icon indicating copy to clipboard operation
graphify copied to clipboard

[Bug]: Maven POM ingestion does not resolve properties inherited from a parent POM

Open afsantamaria-stratio opened this issue 2 months ago • 3 comments

Pre-flight checks

  • [x] I have checked the Troubleshooting section in the README

What happened?

Follow-up to #3806, which v0.9.68 fixed for inherited groupId and a POM's own ${...} properties — thanks, that already recovers a lot. One case from that report is still open.

Problem

_parse_pom resolves ${...} only against the <properties> of the POM being parsed and the built-in project.* values. A property defined in a parent POM and used in a child stays literal, so the dependency does not match the module node and the depends_on edge is dropped.

This is how most Scala multi-module projects suffix their artifacts: scala.binary.version lives in the root POM and every module depends on foo_${scala.binary.version}.

Steps to reproduce

git clone --depth 1 https://github.com/apache/livy.git
  graphify explain "livy-server"
  
  
  - `scala.binary.version` is defined only in the root `pom.xml`; `server/pom.xml` uses it 17
    times.
  - The module nodes resolve (`org.apache.livy:livy-core_2.12`, `livy-core_2.13`), but
    `server/pom.xml` still looks up `livy-core_${scala.binary.version}`.
  - Result: `livy-server → livy-core` and `livy-server → livy-repl` are missing, and no module is
    shown depending on `livy-core`, while 8 declare it.
  - Overall, v0.9.70 keeps 39 of the 55 inter-module dependencies the POMs declare (v0.9.67 kept
    18).

Error output or graph output

- `scala.binary.version` is defined only in the root `pom.xml`; `server/pom.xml` uses it 17
    times.
  - The module nodes resolve (`org.apache.livy:livy-core_2.12`, `livy-core_2.13`), but
    `server/pom.xml` still looks up `livy-core_${scala.binary.version}`.
  - Result: `livy-server → livy-core` and `livy-server → livy-repl` are missing, and no module is
    shown depending on `livy-core`, while 8 declare it.
  - Overall, v0.9.70 keeps 39 of the 55 inter-module dependencies the POMs declare (v0.9.67 kept
    18).

Graphify version

0.9.70

Operating System

macOS

Python Version

3.1

Installation Method

uv tool install (recommended)

Additional Environment Details

No response

Additional context

No response

afsantamaria-stratio avatar Sep 28 '26 07:09 afsantamaria-stratio

Thanks for opening this issue, @afsantamaria-stratio. A maintainer will take a look soon.

If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

github-actions[bot] avatar Sep 28 '26 07:09 github-actions[bot]

hi, would be happy to take this issue up

pranshuj73 avatar Sep 28 '26 11:09 pranshuj73

raised a PR that fixes this: #3897

pranshuj73 avatar Sep 29 '26 06:09 pranshuj73