Repository navigation
Conversation
Clarifies when to use a mixin vs. a custom packaging type: - packaging owns artifact type + lifecycle binding at SPI level - mixins cover POM-level composition (plugins, deps, properties) - illustrates with the maven-plugin-mixin pattern from apache/maven#13658 Also updates the intro tense ('will provide' → 'provide') since Maven 4.1 has shipped.
1 task done
Bukama
approved these changes
Nov 3, 2026
| # Maven Mixins (Maven 4.1) | ||
|
|
||
| Maven Mixins will provide (in Maven 4.1) a powerful mechanism for sharing common POM configuration across multiple projects without the limitations of traditional inheritance. Mixins allow you to compose your project configuration from multiple sources, promoting better code reuse and maintainability. | ||
| Maven Mixins provide (since Maven 4.1) a powerful mechanism for sharing common POM configuration across multiple projects without the limitations of traditional inheritance. Mixins allow you to compose your project configuration from multiple sources, promoting better code reuse and maintainability. |
Contributor
There was a problem hiding this comment.
I think we need to adjust several places in the site where we talk about Maven 4.1, when the PR to skip it in favor to 4.2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Enhances the Maven Mixins guide with a new "Mixins vs. Packaging" section that explains when to use each mechanism.
The question came up naturally while working on apache/maven#13658 (the
maven-plugin-mixin— a JSR 269 annotation processor delivered as a mixin to replace<packaging>maven-plugin</packaging>for Maven 4 plugins).What's added
<packaging>: artifact type declaration (backed byArtifactHandler) and lifecycle binding injection (backed byLifecycleMappingProvider)maven-plugin-mixinpattern that replaces<packaging>maven-plugin</packaging>in Maven 4, including the bootstrap problem it solvesAlso fixes a tense issue in the intro ("will provide" changed to "provide") since Maven 4.1 has shipped.
Related
feat: introduce maven-plugin-mixin for compile-time Maven 4 plugin descriptor generation maven#13658 —
maven-plugin-mixin: the motivating concrete exampleCreate Guide about using custom packaging #681 — open issue: "Create Guide about using custom packaging"
I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004