Skip to content

Test with maven-testing and drop the explicit Guice dependency - #730

Merged
slachiewicz merged 1 commit into
maven-deploy-plugin-4.xfrom
agent/drop-test-guice-4x
Oct 24, 2026
Merged

slachiewicz merged 1 commit into
maven-deploy-plugin-4.xfrom
agent/drop-test-guice-4x

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Replaces the retired org.apache.maven.plugin-testing:maven-plugin-testing-harness 4.0.0-beta-4 with org.apache.maven:maven-testing:${mavenVersion}. maven-testing depends on the guice:classes and maven-xml that Maven core ships, so the explicit Guice test dependency (on 7.0.0, which drops the javax.inject support Maven 4 still uses) and the maven-xml pin that worked around the old harness's rc-3 maven-xml are both removed.

DeployFileMojoTest now imports ArtifactStub from org.apache.maven.testing.plugin.stubs: in maven-testing the org.apache.maven.api.plugin.testing.stubs class is a deprecated relocation shim with only a no-arg constructor. Same change as apache/maven-install-plugin#478.

Verified: mvn verify on Maven 4.0.0-rc-7, JDK 17 → 50 tests, 0 failures.

maven-testing brings the Guice and maven-xml that Maven core ships; the retired plugin-testing harness did not, which is why Guice was declared and maven-xml pinned here.
@slachiewicz
slachiewicz marked this pull request as ready for review October 24, 2026 11:18

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Clean migration from maven-plugin-testing-harness:4.0.0-beta-4 to maven-testing:${mavenVersion} — the workarounds (Guice 7.0.0 dep and maven-xml pin) were artifacts of the old harness and are correctly removed. The ArtifactStub import moves to the canonical new package. Consistent with the companion install-plugin PR #478.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@slachiewicz
slachiewicz merged commit eb54451 into maven-deploy-plugin-4.x Oct 24, 2026
13 checks passed
@slachiewicz
slachiewicz deleted the agent/drop-test-guice-4x branch October 24, 2026 11:35
@github-actions github-actions Bot added this to the 4.0.0-beta-4 milestone Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants