arturobernalg opened a new pull request, #13909: URL: https://github.com/apache/maven/pull/13909
Invoking a goal with an explicit execution id that the POM never declares, e.g. `mvn dependency:purge-local-repository@nonexistent`, silently ran the goal with its default configuration instead of failing. The id after '@' was taken at face value and never checked against the plugin's declared <execution> ids. Validate it in both execution-plan calculators (the classic path in DefaultLifecycleExecutionPlanCalculator and the parallel-build path in BuildPlanExecutor, which build the plan independently) and fail with a clear message naming the missing execution id and the goal, rather than silently falling back to the default configuration. An execution id is only checked when one is explicitly supplied on the command line; the synthetic "default-cli" id used when none is given is unaffected. Verified end-to-end against a built apache-maven distribution: the reported command now fails with a clear error, while running the goal without an execution id, or with one actually declared in the POM, still succeeds as before. Fixes #7791 --- 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]
