goutamadwant opened a new pull request, #1234: URL: https://github.com/apache/maven-plugin-tools/pull/1234
Fixes #1230. A Maven 4 mojo can declare an `@Resolution` field, but Plugin Tools currently omits it from `plugin.xml`. Maven then leaves the field null even when the project has matching dependencies. This change carries the annotated field, `pathScope`, and `requestType` through scanning and descriptor generation, including fields inherited from a superclass. It writes `<resolutions>` only for Maven 4 descriptors. The `v4api-4x` integration test checks the generated XML and runs a mojo with direct and inherited resolution fields against a real compile dependency. Validation: - On unmodified `master` with Maven 4.0.0-rc-7, the plugin builds, but the descriptor has no `<resolutions>` and goal execution fails because the compile dependency was not injected. - The targeted `v4api-4x` integration test passes with Maven 4.0.0-rc-7 after the fix. - `mvn -Prun-its verify` passes with Maven 3.9.16 and JDK 21: 32 plugin integration tests pass, one Maven 4 fixture is skipped under Maven 3, and 12 plugin-report integration tests pass. - `git diff --check` passes. --- 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). - [ ] 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]
