GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add validation for Plexus-based plugin dependency injection by slawekjaranowski · Pull Request #12651 · apache/maven

Conversation

@slawekjaranowski

@slawekjaranowski slawekjaranowski commented Jul 31, 2026

Copy link
Copy Markdown
Member

What changed

  • Added a new validation that detects outdated dependency injection usage in plugins.
  • Added a clear warning for plugin developers when this pattern is found.
  • Pointed users to the recommended modern injection approach.

based on: 2a8b6b2

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cstamas reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@slawekjaranowski
Add validation for Plexus-based plugin dependency injection
a5f2e4b
What changed

- Added a new validation that detects outdated dependency injection usage in plugins.
- Added a clear warning for plugin developers when this pattern is found.
- Pointed users to the recommended modern injection approach.

based on: 2a8b6b2
@slawekjaranowski slawekjaranowski self-assigned this Jul 31, 2026
@slawekjaranowski slawekjaranowski added mvn3 enhancement New feature or request labels Jul 31, 2026
@slawekjaranowski
slawekjaranowski requested review from cstamas and gnodet July 31, 2026 14:03
gnodet
gnodet approved these changes Jul 31, 2026
View reviewed changes

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Clean cherry-pick of the already-merged #12577 to the maven-3.10.x maintenance branch. The validator logic is identical to master; the test was properly adapted for the 3.10.x MojoDescriptor API (real instance via ComponentDescriptor.addRequirement rather than mocking). Adding mockito-junit-jupiter as a separate dependency is correct for 3.10.x, which doesn't use mockito-bom like master.

Two minor non-blocking nits (same as noted on #12649):

  • pluginValidationManager field is protected but this is a concrete, package-private, final class with no subclasses — should be private
  • Missing @since 3.10.0 Javadoc tag (other validators in the same package include @since)

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

Claude Code on behalf of gnodet

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...re/src/main/java/org/apache/maven/plugin/internal/PluginDescriptorRequirementsValidator.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...re/src/main/java/org/apache/maven/plugin/internal/PluginDescriptorRequirementsValidator.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski
Apply review comments
b37f3e6
@slawekjaranowski
slawekjaranowski merged commit c7c70df into apache:maven-3.10.x Aug 1, 2026
18 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski
slawekjaranowski deleted the cp-12577-3.x branch August 1, 2026 15:43
@github-actions github-actions Bot added this to the 3.10.0 milestone Aug 1, 2026
@sparsick sparsick mentioned this pull request Aug 5, 2026
Preparation for Maven 3.10.0 Release support-and-care/maven-support-and-care#211
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gnodet gnodet gnodet approved these changes
@cstamas cstamas Awaiting requested review from cstamas

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@slawekjaranowski slawekjaranowski

Labels

enhancement New feature or request mvn3

Projects

None yet

Milestone

3.10.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@slawekjaranowski @gnodet
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.