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

   ## Problem
   
   The `maven-it-plugin-bootstrap` is an internal test-only plugin. Since 
maven-plugin-tools 3.8+, the `maven:descriptor` goal automatically infers 
`requiresMavenVersion` from the version of the `maven-plugin-api` provided 
dependency.
   
   In `its/pom.xml`, this dependency is declared as `4.0.0-SNAPSHOT`. Maven 
resolves it from the Apache Snapshots repository and picks up the **latest 
timestamped snapshot** (e.g. `4.0.0-20260921.041318-545`). That timestamped 
version ends up in the plugin descriptor as `requiresMavenVersion`.
   
   When the IT bootstrap test then runs against the locally built Maven (which 
identifies itself as `4.0.0-SNAPSHOT` without a timestamp), Maven 4's version 
comparison treats the timestamped snapshot as newer and fails with:
   
   ```
   Required Maven version 4.0.0-20260921.041318-545 is not met by current 
version 4.0.0-SNAPSHOT
   ```
   
   This causes `MavenITBootstrapTest` to fail, which cascades into ~565 errors 
across all other ITs (they all depend on the bootstrap step to download 
dependencies). **Every PR against `maven-4.0.x` is currently broken by this.**
   
   ## Root cause trace
   
   1. `DefaultMojoAnnotationsScanner` finds `maven-plugin-api` in the project 
dependencies
   2. Calls `dependency.getVersion()` → returns the resolved timestamped 
version (e.g. `4.0.0-20260921.041318-545`)
   3. Sets that as `usedMavenApiVersion` on the request
   4. `DescriptorGeneratorMojo.getRequiredMavenVersion()` (mode=`auto`) uses it 
as `requiresMavenVersion`
   5. Locally built Maven self-reports as `4.0.0-SNAPSHOT` (no timestamp)
   6. Maven 4 version comparison: timestamped > non-timestamped → **failure**
   
   ## Fix
   
   Explicitly set `<requiredMavenVersion/>` (empty string → no requirement) in 
the `maven-plugin-plugin` configuration for this bootstrap plugin. It is an 
internal test infrastructure plugin with no meaningful minimum Maven version 
requirement.


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