← Back to issue list

feat(maven-use): handle indirect plugin dependencies

View original Github issue

Metadata

Project
craft-parts
Number
#1155
Type
pull request
State
merged
Author
bepri
Labels
—
Created
Updated
Closed

Current evaluation

Merged #1155 in d322b522: maven-use now pins indirect Maven plugins found on disk via pluginManagement instead of relying on unavailable hard-coded defaults.

Resolution: closed resolved

Reason: PR #1155 was approved, passed CI, and merged as commit d322b522. It adds explicit pluginManagement pins for available plugins that were not declared directly.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? ----- When a project indirectly depended on a plugin (e.g. the very common implicit dependency on Maven's "jar" plugin), Maven would use an internal hard-coded list of default version numbers to select what version to use, even if that version was not present. This PR changes the maven-use plugin to scan for all available Maven plugins on disk and add an explicit pin for every available plugin using `pluginManagement`, `pom.xml`'s equivalent to pip constraints. The main steps taken for this were: - Change the mapping of available Maven dependencies on-disk to also include the "packaging type" of each, which reveals if it is a plugin or not - Keep track of what plugins were an explicit dependency - For every plugin that was not an explicit dependency, but is found on disk, a `pluginManagement` entry is added instead - The integration test had the workaround for this bug removed in every file but one, which was kept to show either behavior works CRAFT-4590.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #1155 in d322b522: maven-use now pins indirect Maven plugins found on disk via pluginManagement instead of relying on unavailable hard-coded defaults.
stealth/space-bunny-alpha — closed resolved Merged #1155 in d322b522: maven-use now pins indirect, on-disk Maven plugins through pluginManagement instead of relying on potentially unavailable hard-coded defaults.
qwen/qwen3.6-35b-a3b — — Merged changes fix Maven indirect plugin dependency handling by scanning available plugins on disk and adding explicit pins via pluginManagement, replacing hard-coded default versions. Approved by three reviewers with all CI checks passing.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Resolves CRAFT-4590 by updating the maven-use plugin to scan for available Maven plugins on disk and explicitly pin indirect dependencies via pluginManagement, replacing hardcoded default version selection.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1163 feat(maven-use): consume binaries directly craft-parts merged Merged #1163 as e4c797ec, adding direct consumption of prebuilt Maven artifacts via a top-level maven-use directory; shipped in 2.17.0.
72%
#1166 feat(maven-use): support multi-module projects craft-parts merged Merged multi-module Maven support: maven-use now recursively discovers and patches nested pom.xml files via commit 31f26daa (#1166).
70%