slachiewicz opened a new pull request, #1683:
URL: https://github.com/apache/maven-dependency-plugin/pull/1683

   Adds a CI job that compiles main and test sources against the Maven version
   `<prerequisites>` declares, so the plugin's supported baseline is actually 
tested.
   
   ```yaml
     baseline:
       name: Baseline (Maven 3.6.3 API)
       ...
         - run: mvn -B --no-transfer-progress -DmavenVersion=3.6.3 test-compile
   ```
   
   `test-compile` rather than `verify` on purpose: API drift is a compile-time 
property, so
   compiling both source roots is sufficient, and it avoids the cost of a 
second full test run.
   It builds with the normal CI Maven — only the `${mavenVersion}` dependency 
stack moves — so
   the inherited `requireMavenVersion` (3.9) is unaffected.
   
   ### This job is expected to be red
   
   It fails today, which is the point — see #1682. `RenderDependenciesMojo` 
line 241 uses
   `MojoExecutionException(Throwable)`, a constructor Maven added in 3.9.0 and 
absent from 3.6.3:
   
   ```
   [ERROR] .../RenderDependenciesMojo.java:[241,50] incompatible types:
           java.io.IOException cannot be converted to java.lang.String
   ```
   
   The reference is in released bytecode too (3.9.0, 3.10.0, 3.11.0), so on 
Maven 3.6.3 that
   branch raises `NoSuchMethodError`.
   
   Kept as a draft until that is resolved. Merge order can go either way:
   
   - fix #1682 first, then this job lands green; or
   - fold the one-line fix into this PR so the guard and the fix arrive 
together.
   
   Happy to do either — say which.
   
   ### Why the existing checks missed it
   
   - The verify matrix runs `3.10.0-rc-1` and `4.0.0-rc-6`; 3.6.3 is never 
built.
   - `requireMavenVersion` constrains the Maven that *builds* the project, not 
the API level it
     compiles against.
   - A class-level linkage check (`jdeps -verbose:class`) reports this clean —
     `MojoExecutionException` exists in both versions; only the constructor 
differs. Catching it
     needs a member-level check, which is what compiling gives you.
   
   <sub>Drafted with Claude — please verify</sub>
   


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