Skip to content

[Backport 4.0.x] Fix #12534: Wire up @After annotation processing in Maven core - #12566

Merged
gnodet merged 4 commits into
maven-4.0.xfrom
backport/12535-after-annotation
Jul 28, 2026
Merged

[Backport 4.0.x] Fix #12534: Wire up @After annotation processing in Maven core#12566
gnodet merged 4 commits into
maven-4.0.xfrom
backport/12535-after-annotation

Conversation

@gnodet

@gnodet gnodet commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Backport of #12535 to maven-4.0.x.

Makes @After repeatable (@Afters container), defaults type() to
PROJECT, and wires up annotation processing in BuildPlanExecutor so
that mojos annotated with @After correctly declare ordering constraints.
Includes unit tests and integration test (mng-12534-after-annotation).

Conflict resolution: the BuildPlanCreatorTest had a commented-out test
block on 4.0.x (/*) vs new test methods on master — kept both (new
tests added before the existing commented block).

Makes @after repeatable (@afters container), defaults type() to PROJECT,
and wires up annotation processing in BuildPlanExecutor so that mojos
annotated with @after correctly declare ordering constraints. Includes
unit test and integration test (mng-12534-after-annotation).

Closes #12535
@gnodet gnodet added this to the 4.0.0-rc-6 milestone Jul 28, 2026
@gnodet gnodet added the mvn40 label Jul 28, 2026

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean backport of #12535 (merged on master). Makes @After repeatable with @Afters container, defaults type() to PROJECT, and wires up annotation processing in BuildPlanExecutor. Comprehensive test coverage with unit tests and integration test (mng-12534-after-annotation). Conflict resolution (commented-out test block) is noted and clean.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

gnodet added a commit to gnodet/maven that referenced this pull request Jul 28, 2026
gnodet and others added 3 commits July 28, 2026 12:17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adapt the IT to the 4.0.x AbstractMavenIntegrationTestCase API:
- Add constructor with version range "[4.0.0-rc-6,)"
- Use File instead of Path (extractResources returns File)
- Use String basedir for newVerifier (not Path)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test plugin referenced maven-api-core 4.1.0-SNAPSHOT (master
version) but on the maven-4.0.x branch the API version is
4.0.0-SNAPSHOT, causing dependency resolution failure in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet
gnodet merged commit 2fea346 into maven-4.0.x Jul 28, 2026
23 checks passed
@gnodet
gnodet deleted the backport/12535-after-annotation branch July 28, 2026 18:14
@gnodet gnodet added the bug Something isn't working label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working mvn40

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants