slachiewicz commented on issue #12676:
URL: https://github.com/apache/maven/issues/12676#issuecomment-5184032621

   ## Checking which Maven 3 plugins already build on Maven 4
   
   A separate, follow-on batch: rather than upgrading anything, these just turn 
on Maven 4 verification so we learn where the Maven 3 plugins stand ahead of 
GA. Same one-line change as apache/maven-javadoc-plugin#1350.
   
   `maven4-enabled: true` **appends** 4.0.0-rc-6 to the existing Maven 3 matrix 
— the plugin is still built and tested with Maven 3, and additionally checked 
against Maven 4. The shared workflow excludes the `{jdk: 8, maven: 4.x}` cell 
automatically.
   
   | PR | plugin |
   |---|---|
   | apache/maven-acr-plugin#144 | packaging |
   | apache/maven-shade-plugin#837 | packaging |
   | apache/maven-war-plugin#644 | packaging |
   | apache/maven-gpg-plugin#330 | tools |
   | apache/maven-toolchains-plugin#192 | tools |
   | apache/maven-scripting-plugin#80 | tools |
   | apache/maven-remote-resources-plugin#288 | tools |
   | apache/maven-doap-plugin#164 | reporting |
   | apache/maven-checkstyle-plugin#677 | reporting |
   | apache/maven-project-info-reports-plugin#645 | reporting |
   
   A red Maven 4 cell on any of these is the useful outcome — better found now 
than at GA.
   
   ### Consistency fix on the Maven 4 side
   
   Two of the Maven-4-native plugins hand-rolled the matrix instead of using 
the switch the shared workflow provides:
   
   ```diff
   -      ff-maven: "4.0.0-rc-6"                     # Maven version for 
fail-fast-build
   -      maven-matrix: '[ "4.0.0-rc-6" ]'
   +      maven4-build: true
   +      maven4-version: '4.0.0-rc-6' # the same as used in project
   ```
   
   | PR |
   |---|
   | apache/maven-resources-plugin#502 |
   | apache/maven-jar-plugin#576 |
   
   Same result, but the version stops being repeated in two places and 
re-pinned on every RC, and the `{jdk: 8}` exclude comes for free rather than 
depending on `jdk-matrix` happening to be `[17, 21]`. The other seven Maven 4 
plugins — clean, install, deploy, compiler, source, archiver, filtering — 
already use `maven4-build`.
   
   ### Audit notes
   
   All 36 repositories currently passing `maven4-enabled: true` were checked 
against their POMs and are genuinely Maven 3 code (`prerequisites` 3.6.3, 
`mavenVersion` 3.9.x, no `maven-api-*` dependencies), so the flag is right in 
every one. `plugin-tools` looked like an exception at version 
`4.0.0-beta-3-SNAPSHOT`, but no module depends on `maven-api-*` and it pins 
both `maven3Version` and `maven4Version`, so `maven4-enabled` is correct there 
too.
   
   One trap worth recording for anyone doing more of these: with 
`maven4-enabled` the shared workflow pipes `matrix-exclude` through `jq`, which 
rejects a trailing comma. Without the flag the value is echoed verbatim, so 
invalid JSON sits there harmlessly until the flag is added. Every repository in 
this batch was checked for it first.
   


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