Skip to content

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Aug 31, 2025

Port of Maven 3 bugfix to Maven 4 (deprecated) maven-embedder module. Maven 4 by default is not affected, but this PR aligns Maven 3 and deprecated maven-embedder module in Maven 4.

The "early" session used to load extension will populate cache in MavenExecutionRequest and same cache is later reused in "normal" session as well.

This is wrong, as if project uses same parent POM as any of loaded extnsions, data loss in form of lost input locations occurs.

Fixes #11081

Port of Maven 3 bugfix to Maven 4 (deprecatd)
`maven-embedder` module. Maven 4 by default is
**not affected**, but this PR aligns Maven 3
and deprecated module in Maven 4.

The "early" session used to load extension will populate
cache in MavenExecutionRequest and same cache is later
reused in "normal" session as well.

This is wrong, as if project uses same parent POM as any
of loaded extnsions, data loss in form of lost input
locations occurs.

Fixes apache#11081
@cstamas cstamas added this to the 4.1.0 milestone Aug 31, 2025
@cstamas cstamas self-assigned this Aug 31, 2025
@cstamas cstamas added the bug Something isn't working label Aug 31, 2025
@cstamas cstamas marked this pull request as ready for review August 31, 2025 15:38
@cstamas cstamas merged commit 735fd50 into apache:master Sep 1, 2025
19 checks passed
@cstamas cstamas deleted the issue-11081-mvn4 branch September 1, 2025 16:04
cstamas added a commit to cstamas/maven that referenced this pull request Sep 1, 2025
Port of Maven 3 bugfix to Maven 4 (deprecatd)
`maven-embedder` module. Maven 4 by default is
**not affected**, but this PR aligns Maven 3
and deprecated module in Maven 4.

The "early" session used to load extension will populate
cache in MavenExecutionRequest and same cache is later
reused in "normal" session as well.

This is wrong, as if project uses same parent POM as any
of loaded extnsions, data loss in form of lost input
locations occurs.

Fixes apache#11081
cstamas added a commit that referenced this pull request Sep 1, 2025
Port of Maven 3 bugfix to Maven 4 (deprecatd)
`maven-embedder` module. Maven 4 by default is
**not affected**, but this PR aligns Maven 3
and deprecated module in Maven 4.

The "early" session used to load extension will populate
cache in MavenExecutionRequest and same cache is later
reused in "normal" session as well.

This is wrong, as if project uses same parent POM as any
of loaded extnsions, data loss in form of lost input
locations occurs.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data loss (input tracking) in certain cases

1 participant