Sitelet https://github.com/apache/maven-plugin-tools/pull/1145
Skip to content

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

Merged
slawekjaranowski merged 1 commit into
apache:maven-plugin-tools-3.xfrom
slawekjaranowski:fix-1138
Aug 4, 2026
Merged

slawekjaranowski merged 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
@slawekjaranowski
slawekjaranowski merged commit 2cdf138 into apache:maven-plugin-tools-3.x Aug 4, 2026
11 checks passed
@slawekjaranowski
slawekjaranowski deleted the fix-1138 branch August 4, 2026 06:10
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