gnodet commented on issue #10196:
URL: https://github.com/apache/maven/issues/10196#issuecomment-4934315849

   Closing this issue — the underlying pain point (needing BOM-defined 
properties in consuming projects) is understood and legitimate, but inheriting 
properties through `<scope>import</scope>` is not the right solution.
   
   **Why not:**
   - BOM imports are specified to import *only* dependency management — this is 
by design, not an oversight.
   - Typical BOMs (Spring Boot, Quarkus) define hundreds of internal 
properties. Importing all of them pollutes the consumer's property space and 
can silently change compiler settings, plugin versions, encoding, etc.
   - With multiple BOMs, property conflicts would depend on declaration order — 
reordering BOM entries (normally harmless) could change build behavior.
   
   **The proper solution — Maven 4 mixins:**
   Maven 4 introduces **mixins** (4.2.0+), which are designed for exactly this 
use case. A mixin gives you explicit, selective inheritance of properties *and* 
the full model (dependency management, plugins, etc.) with clear precedence 
semantics:
   
   ```xml
   <mixins>
     <mixin>
       <groupId>com.company</groupId>
       <artifactId>company-bom</artifactId>
       <version>1.0.0</version>
     </mixin>
   </mixins>
   ```
   
   **For Maven 3 users today**, the recommended workaround remains using a 
parent POM instead of a BOM import when you need both dependency management and 
properties.
   
   See the discussion on PR #12417 for the full analysis.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to