gnodet commented on PR #13897:
URL: https://github.com/apache/maven/pull/13897#issuecomment-6740597894

   Good progress. Two issues to address before merge.
   
   **1. `modelVersion` should be `4.2.0`, not `4.1.0`**
   
   The `master` branch targets Maven 4.2.0. The `includes` field is declared as 
`<version>4.1.0+</version>` in the `.mdo`, and the validator error messages say 
`"use modelVersion 4.1.0 or remove 'includes'"`. Since the feature lands in 
4.2.0, the version gate should be `4.2.0+` throughout: the `.mdo` field 
version, `Version.V42`, and all error messages. See how mixins are gated on the 
same validator (around line 364) for the correct `4.2.0` pattern.
   
   **2. Consider adding an `id` attribute to `<include>` for consistency**
   
   Two other open PRs introduce a compact `id` attribute using 
`groupId:artifactId` coordinate syntax:
   - #11904 adds `id` to `Dependency`, `Exclusion`, and `Mixin`
   - #13910 adds `id` to `Extension` in settings
   
   For consistency, `<include>` should support the same compact form:
   
   ```xml
   <includes>
     <include id="org.apache.maven:*"/>
     <include id="com.google.guava:guava"/>
   </includes>
   ```
   
   instead of the more verbose:
   
   ```xml
   <includes>
     <include>
       <groupId>org.apache.maven</groupId>
       <artifactId>*</artifactId>
     </include>
   </includes>
   ```
   
   Since `Inclusion` only has `groupId` and `artifactId` (no version, type, 
classifier), the `id` format is simply `groupId:artifactId` — straightforward 
to parse. If #11904 lands first the same normalization infrastructure can be 
reused; otherwise a minimal two-segment parser inline is enough.
   
   _This review was posted by an AI agent, Hermès, on behalf of 
[@gnodet](https://github.com/gnodet)._


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