Skip to content

Use a MojoExecutionException constructor that exists in Maven 3.6.3 - #1684

Merged
slachiewicz merged 1 commit into
masterfrom
fix-1682-baseline-ctor
Aug 10, 2026
Merged

Use a MojoExecutionException constructor that exists in Maven 3.6.3#1684
slachiewicz merged 1 commit into
masterfrom
fix-1682-baseline-ctor

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

MojoExecutionException(Throwable) arrived in Maven 3.9.0, so on the version <prerequisites>
declares, RenderDependenciesMojo.store raised NoSuchMethodError instead of the exception it
meant to throw. The reference is in released bytecode for 3.9.0, 3.10.0 and 3.11.0, not just in
source.

The message follows the sibling catch a few lines below rather than the bare e.getMessage()
the issue sketched, so the failure names the directory it could not create.

No unit test accompanies this

Not an omission. Compiled against the current <mavenVersion> (3.9.16) the constructor exists,
so any test of this branch passes with or without the fix. The only check that fails without it
is compiling against the baseline itself:

Verified: mvn -DmavenVersion=3.6.3 clean test-compile → BUILD SUCCESS; fails to compile on the parent commit

That check is #1683, which is red today for precisely this reason and goes green once this lands.
Merge this first — landing the guard first would turn master red.

Fixes #1682

Drafted with Claude — please verify

MojoExecutionException(Throwable) arrived in Maven 3.9.0, so on the version
<prerequisites> declares this branch raised NoSuchMethodError instead of the
exception it meant to throw. Do not collapse it back to the single-argument
form while the declared prerequisite is still 3.6.3.

The message follows the sibling catch a few lines below, which already names
the file it failed on.

Verified: mvn -DmavenVersion=3.6.3 clean test-compile -> BUILD SUCCESS, and
fails to compile without this change.

Fixes #1682

Generated-by: Claude Opus 5 (1M context)
@slachiewicz slachiewicz added the bug Something isn't working label Aug 10, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review August 10, 2026 21:48
@slachiewicz
slachiewicz merged commit 5e03fd8 into master Aug 10, 2026
5 of 7 checks passed
@slachiewicz
slachiewicz deleted the fix-1682-baseline-ctor branch August 10, 2026 21:51
@github-actions github-actions Bot added this to the 3.11.1 milestone Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render-dependencies breaks on Maven 3.6.3, the declared prerequisite

1 participant