gnodet opened a new pull request, #11775:
URL: https://github.com/apache/maven/pull/11775

   ## Summary
   
   When a POM-packaged project (e.g., a parent POM) uses model version 4.1.0 
features such as profile condition activation or subprojects, the consumer POM 
cannot be downgraded to 4.0.0. This breaks Maven 3, Gradle, and any tool that 
only supports model version 4.0.0.
   
   This PR generates dual consumer POMs for such projects:
   - **Main POM** (no classifier): 4.0.0-compatible with 4.1.0 features 
stripped (condition, packaging activation, build sources, extension 
configuration)
   - **Consumer POM** (`consumer` classifier): 4.1.0 full-fidelity with parent 
classifier reference
   
   ### Changes
   - Add `classifier` field to `Parent` in `maven.mdo` (4.1.0+)
   - `DefaultConsumerPomBuilder`: add `stripTo400()` and dual POM generation 
logic
   - `ConsumerPomArtifactTransformer`: handle `consumer-full` artifact 
lifecycle and remap during install/deploy
   - `DefaultModelResolver`: pass parent classifier during external resolution
   - `DefaultModelBuilder`: skip local parent resolution when classifier is set
   
   Fixes #11772
   
   ## Test plan
   - [x] New IT `MavenITgh11772DualConsumerPomTest` verifies dual POM generation
   - [x] Existing consumer POM ITs pass without regressions


-- 
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