You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/07/25 06:32:07 UTC
[PR] Wire up @After annotation scanning in the annotation-based descriptor extractor [maven-plugin-tools]
gnodet opened a new pull request, #1137:
URL: https://github.com/apache/maven-plugin-tools/pull/1137
## Summary
- Register `@After` / `@Afters` (v4 API) in `CLASS_LEVEL_ANNOTATIONS` so the ASM scanner picks them up
- Add `AfterAnnotationContent` datamodel class and `List<AfterAnnotationContent>` field on `MojoAnnotatedClass`
- Enhance `MojoAnnotationVisitor` to track nested annotation visitors (needed to unpack the `@Afters` repeatable container)
- Process single `@After` and `@Afters` container in `DefaultMojoAnnotationsScanner.analyzeVisitors()`
- Walk the class hierarchy collecting `@After` annotations and map them to `ExtendedMojoDescriptor.AfterLink` in `JavaAnnotationsMojoDescriptorExtractor.toMojoDescriptors()`
- Emit `<afterLinks>/<afterLink>` elements in the v4 plugin descriptor via `PluginDescriptorFilesGenerator`
Complements https://github.com/apache/maven/pull/12535 which adds the model (`AfterLink` in `plugin.mdo`), runtime processing (`BuildPlanExecutor.applyAfterLinks`), `@Repeatable` support on `@After`, and an IT that currently hand-crafts the descriptor because the scanner did not exist yet.
## Test plan
- [x] All existing tests pass (28 tests, 0 failures)
- [x] Full project build succeeds
- [ ] Verify with the IT from apache/maven#12535 that the generated descriptor matches the hand-crafted one
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Wire up @After annotation scanning in the annotation-based descriptor extractor [maven-plugin-tools]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski merged PR #1137:
URL: https://github.com/apache/maven-plugin-tools/pull/1137
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org