arturobernalg opened a new pull request, #13692: URL: https://github.com/apache/maven/pull/13692
Fixes #13690. Duplicate of #13689, which gnodet closed in favor of this one and whose root-cause analysis and proposed fix (Option A) this PR implements as-is. ExecutionEventLogger.sessionStarted() always offset the project counter against session.getAllProjects(), which is also the full reactor under -pl because FilteredProjectDependencyGraph.getAllProjects() delegates to the unfiltered parent graph (#804, MNG-7098). A plain -pl subset always showed [N-k/N]..[N/N] instead of [1/k]..[k/k]. Only offset against the full reactor when resuming (-rf), where the selected projects really are the tail of a larger build and the absolute position is meaningful; otherwise count relative to the selected projects, restoring the pre-MNG-7098 behaviour for -pl. Applied to both impl/maven-cli and compat/maven-embedder, which carry the same logic. New test for the -pl-without-rf case fails on the old code and passes with the fix; the existing -rf test now stubs an actual resumeFrom to exercise that branch. Ran the affected module tests, checkstyle:check and spotless:check locally, all green. --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
