Skip to content

Give DefaultProgress a single scope annotation - #139

Merged
slachiewicz merged 1 commit into
masterfrom
agent/default-progress-single-scope
Nov 14, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/default-progress-single-scope

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Guice rejects a class with two scope annotations, so @Singleton plus @MojoExecutionScoped on DefaultProgress broke every realm containing the 1.3.0 jar. DefaultProgress takes a MojoExecution, so @MojoExecutionScoped stays. The module skips tests, so this has no unit test.

Fixes #127

Verified: issue reproducer and a probe mojo injecting Progress on Maven 3.9.16, 3.10.0-rc-1 and 4.0.0-rc-7, plus the probe as an <extensions>true</extensions> plugin and with the jar in .mvn/extensions.xml on 3.9.16 and 4.0.0-rc-7 → 1.3.0 fails with DuplicateScopeAnnotations, this branch passes with one DefaultProgress per mojo execution.

Guice rejects a class carrying both @singleton and @MojoExecutionScoped,
which broke every plugin realm containing the jar. DefaultProgress takes a
MojoExecution, so it is per-execution; do not add @singleton back.

Fixes #127
@slachiewicz slachiewicz added the bug Something isn't working label Nov 14, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 14, 2026 12:56
@slachiewicz
slachiewicz merged commit b533488 into master Nov 14, 2026
13 checks passed
@slachiewicz
slachiewicz deleted the agent/default-progress-single-scope branch November 14, 2026 13:10
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.

DefaultProgress carries two scope annotations, so 1.3.0 breaks every mojo in a plugin realm

1 participant