Skip to content

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Sep 1, 2025

When only part of a reactor is built, ReactorReader mirrors artifacts into a project-local repo. If a module depends on another reactor module not in the current session, POM resolution may hit that repo. Today, the main POM path contains the build POM, which can include Maven-4 build-time constructs and be invalid as a repository POM (e.g., missing parent.*). As a result, dependency resolution can fail with fatal model errors.

Teach ReactorReader to prefer the consumer POM (classifier=consumer) for POM artifacts when present in the project-local repo, falling back to the main POM otherwise. This avoids consuming a build POM from the project-local repo without changing the repo contents or layout.

gnodet added a commit that referenced this pull request Sep 1, 2025
…l repo using consumer POM if present

New IT builds module 'a' first to populate project-local repo, then builds only 'b' which depends on 'a'. The antrun assertion ensures the consumer POM exists, and the behavior is verified by successful resolution.
@gnodet gnodet force-pushed the gh-reactorreader-prefer-consumer-pom branch from 77298cc to b451d75 Compare September 2, 2025 07:44
@gnodet gnodet added this to the 4.1.0 milestone Sep 2, 2025
@gnodet gnodet added bug Something isn't working backport labels Sep 2, 2025
…ving POMs

When only part of a reactor is built, ReactorReader mirrors artifacts into a project-local repo. If a module depends on another reactor module not in the current session, POM resolution may hit that repo. Today, the main POM path contains the build POM, which can include Maven-4 build-time constructs and be invalid as a repository POM (e.g., missing parent.*). As a result, dependency resolution can fail with fatal model errors.

Teach ReactorReader to prefer the consumer POM (classifier=consumer) for POM artifacts when present in the project-local repo, falling back to the main POM otherwise. This avoids consuming a build POM from the project-local repo without changing the repo contents or layout.
@gnodet gnodet force-pushed the gh-reactorreader-prefer-consumer-pom branch from b451d75 to 576d21a Compare September 2, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant