Skip to content

Add validator for component requirements in generated plugin descriptor - #1145

Open
slawekjaranowski wants to merge 1 commit into
apache:maven-plugin-tools-3.xfrom
slawekjaranowski:fix-1138
Open

Add validator for component requirements in generated plugin descriptor#1145
slawekjaranowski wants to merge 1 commit into
apache:maven-plugin-tools-3.xfrom
slawekjaranowski:fix-1138

Conversation

@slawekjaranowski

Copy link
Copy Markdown
Member

What changed

  • Added ValidateComponentRequirement to scan generated PluginDescriptor mojos for Plexus component requirements (@Component-mapped requirements).
  • Extended integration test verification (java-basic-annotations/verify.groovy) to assert the expected warning messages in build.log.

Why

  • @Component usage in mojos is deprecated, but generation currently gives no visible signal when <requirement> entries are produced.
  • A warning at descriptor generation time helps plugin authors migrate toward JSR 330 injection and avoid hidden legacy patterns.

Fixes #1138

@slawekjaranowski slawekjaranowski added the enhancement New feature or request label Aug 2, 2026
@slawekjaranowski slawekjaranowski linked an issue Aug 2, 2026 that may be closed by this pull request
@slawekjaranowski slawekjaranowski added this to the 3.16.0 milestone Aug 2, 2026
### What changed
- Added `ValidateComponentRequirement` to scan generated `PluginDescriptor` mojos for Plexus component requirements (`@Component`-mapped requirements).
- Extended integration test verification (`java-basic-annotations/verify.groovy`) to assert the expected warning messages in `build.log`.

### Why
- `@Component` usage in mojos is deprecated, but generation currently gives no visible signal when `<requirement>` entries are produced.
- A warning at descriptor generation time helps plugin authors migrate toward JSR 330 injection and avoid hidden legacy patterns.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WARN if generated plugin.xml contains <requirement>

2 participants