Enhancement: resolve Maven versions from a parent POM’s `dependencyManagement` in the same repository

オープン
#720 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
57/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, typescript
領域
backend, databases

調査の方向性

Start with parsePom and mavenCoordinateReady in src/core-open/scanners/java-scanner.ts, then read test/fixtures/maven-multi-module, test/maven-multi-module.test.ts, and the relevant DOCS.md section. Add offline tests for parent and three level ancestor management, child version precedence, and missing or out of root parents; confirm existing vg build behavior remains deterministic. Done when scan and SBOM resolve the child versions as specified and DOCS.md describes the limitation and imported BOM scope.

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted
  • Difficulty: medium
  • Area: Java / Maven / SBOM
Problem

This is already documented as a limitation, not an accident. DOCS.md says a version that exists only on a parent POM’s <dependencyManagement> is omitted on the child; the parent file may still have its own row for that pin. test/fixtures/maven-multi-module is a parent that pins commons-lang3 and gson, and a child app/pom.xml that lists both coordinates with no <version>. mavenCoordinateReady in src/core-open/scanners/java-scanner.ts (around lines 329–333, used around line 757) drops any coordinate without a concrete version. parsePom reads the parent’s coordinates for ${project.version} / ${project.groupId} but never opens the parent file (no relativePath walk) to copy managed versions onto the child.

vg scan and vg sbom export therefore miss the child’s direct dependencies in the usual multi-module layout. vg build keeps versionless coordinates on purpose (test/maven-multi-module.test.ts); this issue is about scan / SBOM versions, not the code map.

Expected behaviour

For a child POM in the same scan tree, load the parent via <relativePath> (default ../pom.xml) and, if needed, walk further ancestors still inside the scan root. Apply that chain’s <dependencyManagement> versions (and property resolution) to the child’s versionless <dependencies>. Do not fetch a parent from Maven Central. Do not treat a parent management pin as a dependency of the parent unless the parent itself declares it (keep today’s parent-row rule). Imported BOMs (<scope>import</scope>) can stay out of scope unless a follow-up is filed; say so in the docs. vg build may keep its versionless import edges; update DOCS.md so the scan column no longer says “Omitted on the child”.

Acceptance
  • Offline tests using test/fixtures/maven-multi-module (and a three-level ancestor case): the child reports commons-lang3 at 3.17.0 and gson at 2.11.0.
  • A child that already has a <version> keeps it (child wins).
  • A missing parent file or a parent outside the scan root does not fail the scan; those versionless coordinates stay omitted.
  • vg build remains deterministic and offline on the existing fixture.
  • DOCS.md is updated.

主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。